From 9800936cce143df949e0f5a66700cf3ea9978b71 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Sun, 10 Sep 2023 13:25:23 -0400 Subject: [PATCH] revert libbfd linking for backward-cpp (#69) 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. --- CMakeLists.txt | 12 ------------ bin/spectatord_main.cc | 5 +---- bin/test_main.cc | 5 +---- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4694a2e..356ec7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -40,7 +32,6 @@ target_link_libraries(spectator_test sample_cfg spectator util - ${BACKWARD_LIBS} ${CONAN_LIBS} ) add_test( @@ -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( @@ -84,7 +74,6 @@ if(NFLX_INTERNAL) netflix_cfg spectatord admin_server - ${BACKWARD_LIBS} ${CONAN_LIBS} ) else() @@ -93,7 +82,6 @@ else() sample_cfg spectatord admin_server - ${BACKWARD_LIBS} ${CONAN_LIBS} ) endif() diff --git a/bin/spectatord_main.cc b/bin/spectatord_main.cc index 56d88da..42719ff 100644 --- a/bin/spectatord_main.cc +++ b/bin/spectatord_main.cc @@ -1,6 +1,3 @@ -#ifdef __linux__ -#define BACKWARD_HAS_BFD 1 -#endif #include "backward.hpp" #include "util/logger.h" #include "spectatord.h" @@ -160,4 +157,4 @@ auto main(int argc, char** argv) -> int { server.Start(); return 0; -} \ No newline at end of file +} diff --git a/bin/test_main.cc b/bin/test_main.cc index f5f6d96..9865185 100644 --- a/bin/test_main.cc +++ b/bin/test_main.cc @@ -1,6 +1,3 @@ -#ifdef __linux__ -#define BACKWARD_HAS_BFD 1 -#endif #include "backward.hpp" #include @@ -13,4 +10,4 @@ int main(int argc, char** argv) { SignalHandling sh{signals}; testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); -} \ No newline at end of file +}