From 2d42b1d6930ec58fa6e1279e81e4fd3cb4123687 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Thu, 5 Dec 2013 12:53:36 +0000 Subject: [PATCH] Run TSan/MSan lit tests only on 64-bit platforms llvm-svn: 196501 --- compiler-rt/lib/msan/lit_tests/CMakeLists.txt | 2 +- compiler-rt/lib/msan/lit_tests/lit.cfg | 3 ++- compiler-rt/lib/tsan/lit_tests/CMakeLists.txt | 4 ++-- compiler-rt/lib/tsan/lit_tests/lit.cfg | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/compiler-rt/lib/msan/lit_tests/CMakeLists.txt b/compiler-rt/lib/msan/lit_tests/CMakeLists.txt index 3fcb3480f284..38d1e59e709e 100644 --- a/compiler-rt/lib/msan/lit_tests/CMakeLists.txt +++ b/compiler-rt/lib/msan/lit_tests/CMakeLists.txt @@ -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} diff --git a/compiler-rt/lib/msan/lit_tests/lit.cfg b/compiler-rt/lib/msan/lit_tests/lit.cfg index fd88ca04d42c..da1bde6dd04a 100644 --- a/compiler-rt/lib/msan/lit_tests/lit.cfg +++ b/compiler-rt/lib/msan/lit_tests/lit.cfg @@ -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) + diff --git a/compiler-rt/lib/tsan/lit_tests/CMakeLists.txt b/compiler-rt/lib/tsan/lit_tests/CMakeLists.txt index 53e5015d1bc4..1f2fbf98e080 100644 --- a/compiler-rt/lib/tsan/lit_tests/CMakeLists.txt +++ b/compiler-rt/lib/tsan/lit_tests/CMakeLists.txt @@ -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" diff --git a/compiler-rt/lib/tsan/lit_tests/lit.cfg b/compiler-rt/lib/tsan/lit_tests/lit.cfg index 0cdb4d838941..c4193639f493 100644 --- a/compiler-rt/lib/tsan/lit_tests/lit.cfg +++ b/compiler-rt/lib/tsan/lit_tests/lit.cfg @@ -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 + " ")) )