Skip to content

Commit f536522

Browse files
committed
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 9ee64c3)
1 parent c8d8248 commit f536522

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ if (COMPILER_RT_HAS_GWP_ASAN)
124124
RTGwpAsan RTGwpAsanBacktraceLibc RTGwpAsanSegvHandler
125125
RTGwpAsanOptionsParser)
126126

127-
list(APPEND SCUDO_CFLAGS -DGWP_ASAN_HOOKS -fno-omit-frame-pointer
128-
-mno-omit-leaf-frame-pointer)
127+
append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer
128+
-mno-omit-leaf-frame-pointer
129+
SCUDO_CFLAGS)
130+
list(APPEND SCUDO_CFLAGS -DGWP_ASAN_HOOKS)
131+
129132
endif()
130133

131134
set(SCUDO_LINK_LIBS)

0 commit comments

Comments
 (0)