From 6f520597502652dde31de03978fd4fbad40de7e8 Mon Sep 17 00:00:00 2001 From: mpilman Date: Tue, 18 Jun 2019 11:02:48 -0700 Subject: [PATCH] Fix backtraces pass -fno-omit-frame-pointer as we otherwise see broken back traces. This should fix #1631 as well. --- cmake/ConfigureCompiler.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake index 2723eaa980..d989283033 100644 --- a/cmake/ConfigureCompiler.cmake +++ b/cmake/ConfigureCompiler.cmake @@ -73,7 +73,6 @@ if(WIN32) add_compile_options(/W3 /EHsc /std:c++17 /bigobj $<$:/Zi> /MP) add_compile_definitions(_WIN32_WINNT=${WINDOWS_TARGET} BOOST_ALL_NO_LIB) else() - set(GCC NO) set(CLANG NO) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") @@ -106,14 +105,14 @@ else() # we always compile with debug symbols. CPack will strip them out # and create a debuginfo rpm - add_compile_options(-ggdb) + add_compile_options(-ggdb -fno-omit-frame-pointer) if(USE_ASAN) add_compile_options( - -fno-omit-frame-pointer -fsanitize=address + -fsanitize=address -DUSE_ASAN) - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address ${CMAKE_THREAD_LIBS_INIT}") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address ${CMAKE_THREAD_LIBS_INIT}") endif() if(PORTABLE_BINARY)