[llvm-branch-commits] [compiler-rt] f536522 - scudo: Only add no-omit-frame-pointer flags when the compiler supports them

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Sep 9 20:42:44 PDT 2021


Author: Tom Stellard
Date: 2021-09-09T20:42:27-07:00
New Revision: f53652203e4974eac67d2e409650c3f22909d7e2

URL: https://github.com/llvm/llvm-project/commit/f53652203e4974eac67d2e409650c3f22909d7e2
DIFF: https://github.com/llvm/llvm-project/commit/f53652203e4974eac67d2e409650c3f22909d7e2.diff

LOG: scudo: Only add no-omit-frame-pointer flags when the compiler supports them

Reviewed By: cryptoad

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

(cherry picked from commit 9ee64c374605683ae80b9641d5312a72c2a67336)

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
index 8c3708d3a45f..d6ffa448d7e0 100644
--- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt
+++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
@@ -124,8 +124,11 @@ if (COMPILER_RT_HAS_GWP_ASAN)
        RTGwpAsan RTGwpAsanBacktraceLibc RTGwpAsanSegvHandler
        RTGwpAsanOptionsParser)
 
-  list(APPEND SCUDO_CFLAGS -DGWP_ASAN_HOOKS -fno-omit-frame-pointer
-                           -mno-omit-leaf-frame-pointer)
+  append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer
+                                                         -mno-omit-leaf-frame-pointer
+                 SCUDO_CFLAGS)
+  list(APPEND SCUDO_CFLAGS -DGWP_ASAN_HOOKS)
+
 endif()
 
 set(SCUDO_LINK_LIBS)


        


More information about the llvm-branch-commits mailing list