[compiler-rt] r298859 - [sanitizers] Avoid using -fomit-frame-pointer on Darwin

Kuba Mracek via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 10:14:48 PDT 2017


Author: kuba.brecka
Date: Mon Mar 27 12:14:48 2017
New Revision: 298859

URL: http://llvm.org/viewvc/llvm-project?rev=298859&view=rev
Log:
[sanitizers] Avoid using -fomit-frame-pointer on Darwin

On Darwin, we're having multiple issues with using -fomit-frame-pointer in the AddressSanitizer and ThreadSanitizer runtimes, so we're actually not using -fomit-frame-pointer in the our builds of the sanitizer dylibs. This patch just pushes our internal change upstream.

The issues are usually with debuggers, profilers and other tools that unwind the stack (crash reporter), which are often simply not able to get a stack trace. And crashlogs that don't contain a stack trace are a huge problem.

Differential Revision: https://reviews.llvm.org/D31376


Modified:
    compiler-rt/trunk/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=298859&r1=298858&r2=298859&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Mon Mar 27 12:14:48 2017
@@ -124,7 +124,7 @@ if(NOT WIN32)
 endif()
 append_list_if(COMPILER_RT_HAS_FNO_BUILTIN_FLAG -fno-builtin SANITIZER_COMMON_CFLAGS)
 append_list_if(COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG -fno-exceptions SANITIZER_COMMON_CFLAGS)
-if(NOT COMPILER_RT_DEBUG)
+if(NOT COMPILER_RT_DEBUG AND NOT APPLE)
   append_list_if(COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG -fomit-frame-pointer SANITIZER_COMMON_CFLAGS)
 endif()
 append_list_if(COMPILER_RT_HAS_FUNWIND_TABLES_FLAG -funwind-tables SANITIZER_COMMON_CFLAGS)




More information about the llvm-commits mailing list