[Sanitizer] Disable Wframe-larger-than on PowerPC hosts
authorAlexey Samsonov <vonosmas@gmail.com>
Tue, 22 Jul 2014 23:10:13 +0000 (23:10 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Tue, 22 Jul 2014 23:10:13 +0000 (23:10 +0000)
llvm-svn: 213702

compiler-rt/lib/sanitizer_common/CMakeLists.txt

index 7ad3f31..86795d1 100644 (file)
@@ -100,7 +100,10 @@ endif()
 set(SANITIZER_CFLAGS ${SANITIZER_COMMON_CFLAGS})
 append_no_rtti_flag(SANITIZER_CFLAGS)
 
-append_if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG -Wframe-larger-than=512 SANITIZER_CFLAGS)
+# Stack frames on PowerPC are much larger than anticipated.
+if(NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC")
+  append_if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG -Wframe-larger-than=512 SANITIZER_CFLAGS)
+endif()
 append_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors SANITIZER_CFLAGS)
 
 add_custom_target(sanitizer_common)