Only use -mno-omit-leaf-frame-pointer with clang builds.
authorMitch Phillips <mitchphillips@outlook.com>
Tue, 2 Jul 2019 21:58:19 +0000 (21:58 +0000)
committerMitch Phillips <mitchphillips@outlook.com>
Tue, 2 Jul 2019 21:58:19 +0000 (21:58 +0000)
Fix build breakage caused by D64085

llvm-svn: 364972

compiler-rt/lib/scudo/CMakeLists.txt

index dde89dd..74bbaff 100644 (file)
@@ -14,8 +14,10 @@ append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread SCUDO_MINIMAL_DYNAMIC_LIBS)
 append_list_if(COMPILER_RT_HAS_LIBLOG log SCUDO_MINIMAL_DYNAMIC_LIBS)
 append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer
                SCUDO_CFLAGS)
-append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG
-               -mno-omit-leaf-frame-pointer SCUDO_CFLAGS)
+if (COMPILER_RT_TEST_COMPILER_ID STREQUAL "Clang")
+  append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG
+                 -mno-omit-leaf-frame-pointer SCUDO_CFLAGS)
+endif()
 
 set(SCUDO_DYNAMIC_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})
 # Use gc-sections by default to avoid unused code being pulled in.