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

llvm-svn: 208322
This commit is contained in:
Timur Iskhodzhanov 2014-05-08 14:53:59 +00:00
parent 649263626a
commit fddadefc33
2 changed files with 5 additions and 2 deletions

View File

@ -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")

View File

@ -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