forked from OSchip/llvm-project
[Sanitizer] Run test/sanitizer_common lit tests on all supported architectures.
llvm-svn: 231025
This commit is contained in:
parent
b846acc6c6
commit
990864018f
|
@ -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.
|
||||
|
|
|
@ -3,6 +3,8 @@ lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configu
|
|||
|
||||
# Tool-specific config options.
|
||||
config.tool_name = "@SANITIZER_COMMON_LIT_TEST_MODE@"
|
||||
config.target_cflags = "@SANITIZER_COMMON_TEST_TARGET_CFLAGS@"
|
||||
config.target_arch = "@SANITIZER_COMMON_TEST_TARGET_ARCH@"
|
||||
|
||||
# Load tool-specific config that would do the real work.
|
||||
lit_config.load_config(config, "@SANITIZER_COMMON_LIT_SOURCE_DIR@/lit.common.cfg")
|
||||
|
|
Loading…
Reference in New Issue