[compiler-rt] r208322 - [ASan tests] Auto-define ASAN_NEEDS_SEGV rather than hardcode it in cmake

Timur Iskhodzhanov timurrrr at google.com
Thu May 8 07:53:59 PDT 2014


Author: timurrrr
Date: Thu May  8 09:53:59 2014
New Revision: 208322

URL: http://llvm.org/viewvc/llvm-project?rev=208322&view=rev
Log:
[ASan tests] Auto-define ASAN_NEEDS_SEGV rather than hardcode it in cmake

Modified:
    compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
    compiler-rt/trunk/lib/asan/tests/asan_test_config.h

Modified: compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/CMakeLists.txt?rev=208322&r1=208321&r2=208322&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/tests/CMakeLists.txt Thu May  8 09:53:59 2014
@@ -36,7 +36,6 @@ append_if(COMPILER_RT_HAS_WNO_VARIADIC_M
 list(APPEND ASAN_UNITTEST_COMMON_CFLAGS
   -DASAN_HAS_BLACKLIST=1
   -DASAN_HAS_EXCEPTIONS=1
-  -DASAN_NEEDS_SEGV=1
   -DASAN_UAR=0)
 
 set(ASAN_BLACKLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/asan_test.ignore")

Modified: compiler-rt/trunk/lib/asan/tests/asan_test_config.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test_config.h?rev=208322&r1=208321&r2=208322&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test_config.h (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test_config.h Thu May  8 09:53:59 2014
@@ -44,7 +44,11 @@ using std::map;
 #endif
 
 #ifndef ASAN_NEEDS_SEGV
-# error "please define ASAN_NEEDS_SEGV"
+# if defined(_WIN32)
+#  define ASAN_NEEDS_SEGV 0
+# else
+#  define ASAN_NEEDS_SEGV 1
+# endif
 #endif
 
 #ifndef ASAN_AVOID_EXPENSIVE_TESTS





More information about the llvm-commits mailing list