forked from OSchip/llvm-project
[Sanitizer] Improve unit tests in COMPILER_RT_DEBUG=ON mode.
Propagate -DSANITIZER_DEBUG definition to unit tests. Make sure unit tests depend on compiler-rt headers. llvm-svn: 225298
This commit is contained in:
parent
c8761f4807
commit
6239ebc1c2
|
@ -131,10 +131,11 @@ set(COMPILER_RT_GTEST_CFLAGS
|
|||
-I${COMPILER_RT_GTEST_PATH}
|
||||
)
|
||||
|
||||
append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 COMPILER_RT_TEST_CFLAGS)
|
||||
|
||||
if(MSVC)
|
||||
# clang doesn't support exceptions on Windows yet.
|
||||
list(APPEND COMPILER_RT_TEST_CFLAGS
|
||||
-D_HAS_EXCEPTIONS=0)
|
||||
list(APPEND COMPILER_RT_TEST_CFLAGS -D_HAS_EXCEPTIONS=0)
|
||||
|
||||
# We should teach clang to understand "#pragma intrinsic", see PR19898.
|
||||
list(APPEND COMPILER_RT_TEST_CFLAGS -Wno-undefined-inline)
|
||||
|
|
|
@ -9,7 +9,7 @@ macro(clang_compile object_file source)
|
|||
parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN})
|
||||
get_filename_component(source_rpath ${source} REALPATH)
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND SOURCE_DEPS clang)
|
||||
list(APPEND SOURCE_DEPS clang compiler-rt-headers)
|
||||
endif()
|
||||
if (TARGET CompilerRTUnitTestCheckCxx)
|
||||
list(APPEND SOURCE_DEPS CompilerRTUnitTestCheckCxx)
|
||||
|
|
|
@ -19,6 +19,7 @@ set(MSAN_UNITTEST_HEADERS
|
|||
)
|
||||
set(MSAN_UNITTEST_COMMON_CFLAGS
|
||||
-I${COMPILER_RT_LIBCXX_PATH}/include
|
||||
${COMPILER_RT_TEST_CFLAGS}
|
||||
${COMPILER_RT_GTEST_CFLAGS}
|
||||
-I${COMPILER_RT_SOURCE_DIR}/include
|
||||
-I${COMPILER_RT_SOURCE_DIR}/lib
|
||||
|
|
|
@ -6,6 +6,7 @@ set_target_properties(TsanUnitTests PROPERTIES
|
|||
|
||||
set(TSAN_UNITTEST_CFLAGS
|
||||
${TSAN_CFLAGS}
|
||||
${COMPILER_RT_TEST_CFLAGS}
|
||||
${COMPILER_RT_GTEST_CFLAGS}
|
||||
-I${COMPILER_RT_SOURCE_DIR}/lib
|
||||
-I${COMPILER_RT_SOURCE_DIR}/lib/tsan/rtl
|
||||
|
|
Loading…
Reference in New Issue