Skip to content

Commit

Permalink
revert libbfd linking for backward-cpp (#69)
Browse files Browse the repository at this point in the history
Linking against this library introduces strong distro-specific requirements
which complicates the build and distribution process. We want to keep things
simple and as generic as possible, so we will abandon getting ultimate stack
traces on the Linux platform.

To help deal with segmentation faults, we will press forward with migrating
to systemd startup scripts, so that we can control the behavior of core dumps.
  • Loading branch information
copperlight authored Sep 10, 2023
1 parent 01712fd commit 9800936
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
12 changes: 0 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ include(CTest)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

if (UNIX AND NOT APPLE)
message(STATUS "platform is linux")
set(BACKWARD_LIBS "-lbfd -ldl")
else()
message(STATUS "platform is NOT linux")
set(BACKWARD_LIBS "")
endif()

add_subdirectory(admin)
add_subdirectory(bench)
add_subdirectory(server)
Expand All @@ -40,7 +32,6 @@ target_link_libraries(spectator_test
sample_cfg
spectator
util
${BACKWARD_LIBS}
${CONAN_LIBS}
)
add_test(
Expand All @@ -62,7 +53,6 @@ target_include_directories(spectatord_test PRIVATE ${CMAKE_SOURCE_DIR})
target_link_libraries(spectatord_test
admin_server
spectatord
${BACKWARD_LIBS}
${CONAN_LIBS}
)
add_test(
Expand All @@ -84,7 +74,6 @@ if(NFLX_INTERNAL)
netflix_cfg
spectatord
admin_server
${BACKWARD_LIBS}
${CONAN_LIBS}
)
else()
Expand All @@ -93,7 +82,6 @@ else()
sample_cfg
spectatord
admin_server
${BACKWARD_LIBS}
${CONAN_LIBS}
)
endif()
Expand Down
5 changes: 1 addition & 4 deletions bin/spectatord_main.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#ifdef __linux__
#define BACKWARD_HAS_BFD 1
#endif
#include "backward.hpp"
#include "util/logger.h"
#include "spectatord.h"
Expand Down Expand Up @@ -160,4 +157,4 @@ auto main(int argc, char** argv) -> int {
server.Start();

return 0;
}
}
5 changes: 1 addition & 4 deletions bin/test_main.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#ifdef __linux__
#define BACKWARD_HAS_BFD 1
#endif
#include "backward.hpp"
#include <gtest/gtest.h>

Expand All @@ -13,4 +10,4 @@ int main(int argc, char** argv) {
SignalHandling sh{signals};
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
}

0 comments on commit 9800936

Please sign in to comment.