Run TSan/MSan lit tests only on 64-bit platforms

llvm-svn: 196501
This commit is contained in:
Alexey Samsonov 2013-12-05 12:53:36 +00:00
parent 996e099d8f
commit 2d42b1d693
4 changed files with 7 additions and 5 deletions

View File

@ -11,7 +11,7 @@ if(MSAN_CAN_INSTRUMENT_LIBCXX)
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
endif()
if(COMPILER_RT_CAN_EXECUTE_TESTS)
if(COMPILER_RT_CAN_EXECUTE_TESTS AND CAN_TARGET_x86_64)
# Run MSan tests only if we're sure we may produce working binaries.
set(MSAN_TEST_DEPS
${SANITIZER_COMMON_LIT_TEST_DEPS}

View File

@ -56,7 +56,8 @@ clang_msan_cflags = ["-fsanitize=memory",
"-mno-omit-leaf-frame-pointer",
"-fno-omit-frame-pointer",
"-fno-optimize-sibling-calls",
"-g"]
"-g",
"-m64"]
clang_msan_cxxflags = ["--driver-mode=g++ "] + clang_msan_cflags
config.substitutions.append( ("%clang_msan ",
" ".join([config.clang] + clang_msan_cflags) +

View File

@ -8,7 +8,7 @@ configure_lit_site_cfg(
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
)
if(COMPILER_RT_CAN_EXECUTE_TESTS)
if(COMPILER_RT_CAN_EXECUTE_TESTS AND CAN_TARGET_x86_64)
# Run TSan output tests only if we're sure we can produce working binaries.
set(TSAN_TEST_DEPS
${SANITIZER_COMMON_LIT_TEST_DEPS}
@ -25,7 +25,7 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
DEPENDS ${TSAN_TEST_DEPS}
)
set_target_properties(check-tsan PROPERTIES FOLDER "TSan unittests")
elseif(LLVM_INCLUDE_TESTS)
elseif(LLVM_INCLUDE_TESTS AND CAN_TARGET_x86_64)
# Otherwise run only TSan unit tests (they are linked using the
# host compiler).
add_lit_testsuite(check-tsan "Running ThreadSanitizer tests"

View File

@ -62,7 +62,8 @@ clang_tsan_cflags = ("-fsanitize=thread "
+ "-g "
+ "-Wall "
+ "-lpthread "
+ "-ldl ")
+ "-ldl "
+ "-m64 ")
clang_tsan_cxxflags = "--driver-mode=g++ " + clang_tsan_cflags
config.substitutions.append( ("%clangxx_tsan ", (" " + config.clang + " " +
clang_tsan_cxxflags + " ")) )