[ASan tests] Auto-define ASAN_NEEDS_SEGV rather than hardcode it in cmake
llvm-svn: 208322
This commit is contained in:
parent
649263626a
commit
fddadefc33
|
|
@ -36,7 +36,6 @@ append_if(COMPILER_RT_HAS_WNO_VARIADIC_MACROS_FLAG -Wno-variadic-macros ASAN_UNI
|
|||
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")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue