diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-02-02 16:05:52 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2016-02-02 16:05:52 +0000 |
commit | bac108ac5ff645c772ec088a484767c9645b38ab (patch) | |
tree | 4343be5b7171d4e0400aeeb774d6ec2e848225f7 | |
parent | ff2e323a32e68e8eae8e86a6bac33630862cba6b (diff) | |
download | bcm5719-llvm-bac108ac5ff645c772ec088a484767c9645b38ab.tar.gz bcm5719-llvm-bac108ac5ff645c772ec088a484767c9645b38ab.zip |
Revert r259512 - [tsan] Add a libc++ and lit testsuite for each ${TSAN_SUPPORTED_ARCH}.
check-tsan does not pick up the correct libc++.so. It succeeded on my machine
by picking up the libc++.so that was built before making this change.
llvm-svn: 259519
-rw-r--r-- | compiler-rt/lib/tsan/CMakeLists.txt | 15 | ||||
-rw-r--r-- | compiler-rt/test/tsan/CMakeLists.txt | 27 | ||||
-rw-r--r-- | compiler-rt/test/tsan/lit.cfg | 10 | ||||
-rw-r--r-- | compiler-rt/test/tsan/lit.site.cfg.in | 2 |
4 files changed, 12 insertions, 42 deletions
diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt index c185cfa1640..0e60cd3464d 100644 --- a/compiler-rt/lib/tsan/CMakeLists.txt +++ b/compiler-rt/lib/tsan/CMakeLists.txt @@ -204,17 +204,10 @@ endif() # Build libcxx instrumented with TSan. if(COMPILER_RT_HAS_LIBCXX_SOURCES AND COMPILER_RT_TEST_COMPILER_ID STREQUAL "Clang") - set(libcxx_tsan_deps) - foreach(arch ${TSAN_SUPPORTED_ARCH}) - get_target_flags_for_arch(${arch} TARGET_CFLAGS) - set(LIBCXX_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libcxx_tsan_${arch}) - add_custom_libcxx(libcxx_tsan_${arch} ${LIBCXX_PREFIX} - DEPS ${TSAN_RUNTIME_LIBRARIES} - CFLAGS ${TARGET_CFLAGS} -fsanitize=thread) - list(APPEND libcxx_tsan_deps libcxx_tsan_${arch}) - endforeach() - - add_custom_target(libcxx_tsan DEPENDS ${libcxx_tsan_deps}) + set(LIBCXX_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libcxx_tsan) + add_custom_libcxx(libcxx_tsan ${LIBCXX_PREFIX} + DEPS ${TSAN_RUNTIME_LIBRARIES} + CFLAGS -fsanitize=thread) endif() if(COMPILER_RT_INCLUDE_TESTS) diff --git a/compiler-rt/test/tsan/CMakeLists.txt b/compiler-rt/test/tsan/CMakeLists.txt index 1f183a41d2b..01e80388bb9 100644 --- a/compiler-rt/test/tsan/CMakeLists.txt +++ b/compiler-rt/test/tsan/CMakeLists.txt @@ -14,28 +14,9 @@ else() set(TSAN_HAS_LIBCXX False) endif() -set(TSAN_TESTSUITES) - -foreach(arch ${TSAN_SUPPORTED_ARCH}) - string(TOLOWER "-${arch}" TSAN_TEST_CONFIG_SUFFIX) - if(ANDROID OR ${arch} MATCHES "arm|aarch64") - # This is only true if we are cross-compiling. - # Build all tests with host compiler and use host tools. - set(TSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER}) - set(TSAN_TEST_TARGET_CFLAGS ${COMPILER_RT_TEST_COMPILER_CFLAGS}) - else() - get_target_flags_for_arch(${arch} TSAN_TEST_TARGET_CFLAGS) - string(REPLACE ";" " " TSAN_TEST_TARGET_CFLAGS "${TSAN_TEST_TARGET_CFLAGS}") - endif() - - string(TOUPPER ${arch} ARCH_UPPER_CASE) - set(CONFIG_NAME ${ARCH_UPPER_CASE}Config) - - configure_lit_site_cfg( - ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in - ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg) - list(APPEND TSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) -endforeach() +configure_lit_site_cfg( + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in + ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg) if(COMPILER_RT_INCLUDE_TESTS) configure_lit_site_cfg( @@ -45,6 +26,6 @@ if(COMPILER_RT_INCLUDE_TESTS) endif() add_lit_testsuite(check-tsan "Running ThreadSanitizer tests" - ${TSAN_TESTSUITES} + ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${TSAN_TEST_DEPS}) set_target_properties(check-tsan PROPERTIES FOLDER "TSan tests") diff --git a/compiler-rt/test/tsan/lit.cfg b/compiler-rt/test/tsan/lit.cfg index 104b243749b..2be10dae1c8 100644 --- a/compiler-rt/test/tsan/lit.cfg +++ b/compiler-rt/test/tsan/lit.cfg @@ -12,7 +12,7 @@ def get_required_attr(config, attr_name): return attr_value # Setup config name. -config.name = 'ThreadSanitizer' + config.name_suffix +config.name = 'ThreadSanitizer' # Setup source root. config.test_source_root = os.path.dirname(__file__) @@ -39,11 +39,9 @@ else: extra_cflags = [] # Setup default compiler flags used with -fsanitize=thread option. -clang_tsan_cflags = (["-fsanitize=thread", - "-Wall"] + - [config.target_cflags] + - config.debug_info_flags + - extra_cflags) +clang_tsan_cflags = ["-fsanitize=thread", + "-Wall", + "-m64"] + config.debug_info_flags + extra_cflags clang_tsan_cxxflags = config.cxx_mode_flags + clang_tsan_cflags # Add additional flags if we're using instrumented libc++. # Instrumented libcxx currently not supported on Darwin. diff --git a/compiler-rt/test/tsan/lit.site.cfg.in b/compiler-rt/test/tsan/lit.site.cfg.in index fec057eca0a..5190b211177 100644 --- a/compiler-rt/test/tsan/lit.site.cfg.in +++ b/compiler-rt/test/tsan/lit.site.cfg.in @@ -1,9 +1,7 @@ ## Autogenerated by LLVM/Clang configuration. # Do not edit! -config.name_suffix = "@TSAN_TEST_CONFIG_SUFFIX@" config.has_libcxx = @TSAN_HAS_LIBCXX@ -config.target_cflags = "@TSAN_TEST_TARGET_CFLAGS@" # Load common config for all compiler-rt lit tests. lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured") |