1 set(HWASAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
5 set(HWASAN_TEST_ARCH ${HWASAN_SUPPORTED_ARCH})
7 foreach(arch ${HWASAN_TEST_ARCH})
8 set(HWASAN_TEST_TARGET_ARCH ${arch})
9 string(TOLOWER "-${arch}" HWASAN_TEST_CONFIG_SUFFIX)
10 get_test_cc_for_arch(${arch} HWASAN_TEST_TARGET_CC HWASAN_TEST_TARGET_CFLAGS)
11 string(TOUPPER ${arch} ARCH_UPPER_CASE)
12 set(CONFIG_NAME ${ARCH_UPPER_CASE})
15 set(HWASAN_ANDROID_FILES_TO_PUSH [])
17 configure_lit_site_cfg(
18 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
19 ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py)
20 list(APPEND HWASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
23 set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
24 list(APPEND HWASAN_TEST_DEPS hwasan)
25 if(NOT COMPILER_RT_STANDALONE_BUILD)
26 if(COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
27 list(APPEND HWASAN_TEST_DEPS lld)
31 add_lit_testsuite(check-hwasan "Running the HWAddressSanitizer tests"
33 DEPENDS ${HWASAN_TEST_DEPS}
34 PARAMS "HWASAN_ENABLE_ALIASES=1"
36 set_target_properties(check-hwasan PROPERTIES FOLDER "Compiler-RT Misc")
38 add_lit_testsuite(check-hwasan-lam
39 "Running the HWAddressSanitizer tests with Intel LAM"
41 DEPENDS ${HWASAN_TEST_DEPS}
42 PARAMS "HWASAN_ENABLE_ALIASES=0"
43 EXCLUDE_FROM_CHECK_ALL
45 set_target_properties(check-hwasan-lam PROPERTIES FOLDER "Compiler-RT Misc")