diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2015-03-02 22:03:52 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-03-02 22:03:52 +0000 |
commit | 8abab7892ba644eb4d3733e090d661f87d333163 (patch) | |
tree | 12e0802e1d03a428dd3102b8d3221de4c6e5626d /test/sanitizer_common/CMakeLists.txt | |
parent | fdfd49384a9bc5f6aea228376de492f43590ac08 (diff) |
[Sanitizer] Run test/sanitizer_common lit tests on all supported architectures.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/sanitizer_common/CMakeLists.txt')
-rw-r--r-- | test/sanitizer_common/CMakeLists.txt | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/test/sanitizer_common/CMakeLists.txt b/test/sanitizer_common/CMakeLists.txt index 13eecbdc1..42f26902b 100644 --- a/test/sanitizer_common/CMakeLists.txt +++ b/test/sanitizer_common/CMakeLists.txt @@ -16,16 +16,26 @@ endif() # Create a separate config for each tool we support. foreach(tool ${SUPPORTED_TOOLS}) string(TOUPPER ${tool} tool_toupper) - if(${tool_toupper}_SUPPORTED_ARCH) + if(${tool_toupper}_SUPPORTED_ARCH AND NOT COMPILER_RT_STANDALONE_BUILD) + list(APPEND SANITIZER_COMMON_TEST_DEPS ${tool}) + endif() + foreach(arch ${${tool_toupper}_SUPPORTED_ARCH}) set(SANITIZER_COMMON_LIT_TEST_MODE ${tool}) + set(SANITIZER_COMMON_TEST_TARGET_ARCH ${arch}) + if(${arch} MATCHES "arm|aarch64") + # This is only true if we're cross-compiling. + set(SANITIZER_COMMON_TEST_TARGET_CFLAGS + ${COMPILER_RT_TEST_COMPILER_CFLAGS}) + else() + get_target_flags_for_arch(${arch} SANITIZER_COMMON_TEST_TARGET_CFLAGS) + endif() + set(CONFIG_NAME ${tool}-${arch}-${OS_NAME}) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in - ${CMAKE_CURRENT_BINARY_DIR}/${tool}/lit.site.cfg) - list(APPEND SANITIZER_COMMON_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${tool}) - if(NOT COMPILER_RT_STANDALONE_BUILD) - list(APPEND SANITIZER_COMMON_TEST_DEPS ${tool}) - endif() - endif() + ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg) + list(APPEND SANITIZER_COMMON_TESTSUITES + ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) + endforeach() endforeach() # Unit tests. |