[compiler-rt] r201213 - [Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag

Alexey Samsonov samsonov at google.com
Tue Feb 11 23:26:40 PST 2014


Author: samsonov
Date: Wed Feb 12 01:26:40 2014
New Revision: 201213

URL: http://llvm.org/viewvc/llvm-project?rev=201213&view=rev
Log:
[Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag

Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
    compiler-rt/trunk/lib/tsan/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=201213&r1=201212&r2=201213&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed Feb 12 01:26:40 2014
@@ -193,6 +193,8 @@ if (SUPPORTS_NO_NON_VIRTUAL_DTOR_FLAG)
 endif()
 check_cxx_compiler_flag(-Wglobal-constructors SUPPORTS_GLOBAL_CONSTRUCTORS_FLAG)
 # Not all sanitizers forbid global constructors.
+check_cxx_compiler_flag("-Werror -Wframe-larger-than=512"
+  SUPPORTS_FRAME_LARGER_THAN_FLAG)
 
 if(APPLE)
   # Obtain the iOS Simulator SDK path from xcodebuild.

Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=201213&r1=201212&r2=201213&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Wed Feb 12 01:26:40 2014
@@ -99,6 +99,9 @@ else()
     /GR-)
 endif()
 
+if(SUPPORTS_FRAME_LARGER_THAN_FLAG)
+  list(APPEND SANITIZER_CFLAGS -Wframe-larger-than=512)
+endif()
 if(SUPPORTS_GLOBAL_CONSTRUCTORS_FLAG)
   list(APPEND SANITIZER_CFLAGS -Wglobal-constructors)
 endif()

Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=201213&r1=201212&r2=201213&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Wed Feb 12 01:26:40 2014
@@ -9,9 +9,10 @@ set(TSAN_CFLAGS
   -fPIE
   -fno-rtti)
 
-set(TSAN_RTL_CFLAGS
-  ${TSAN_CFLAGS}
-  -Wframe-larger-than=512)
+set(TSAN_RTL_CFLAGS ${TSAN_CFLAGS})
+if(SUPPORTS_FRAME_LARGER_THAN_FLAG)
+  list(APPEND TSAN_RTL_CFLAGS -Wframe-larger-than=512)
+endif()
 if(SUPPORTS_GLOBAL_CONSTRUCTORS_FLAG)
   list(APPEND TSAN_RTL_CFLAGS -Wglobal-constructors)
 endif()





More information about the llvm-commits mailing list