Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / hwasan / CMakeLists.txt
blob927d0d74bd6ec712efa7c754ee6ef6628fa7856c
1 set(HWASAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
3 set(HWASAN_TESTSUITES)
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})
14   # FIXME: Set this.
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})
21 endforeach()
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)
28   endif()
29 endif()
31 add_lit_testsuite(check-hwasan "Running the HWAddressSanitizer tests"
32   ${HWASAN_TESTSUITES}
33   DEPENDS ${HWASAN_TEST_DEPS}
34   PARAMS "HWASAN_ENABLE_ALIASES=1"
35   )
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"
40   ${HWASAN_TESTSUITES}
41   DEPENDS ${HWASAN_TEST_DEPS}
42   PARAMS "HWASAN_ENABLE_ALIASES=0"
43   EXCLUDE_FROM_CHECK_ALL
44   )
45 set_target_properties(check-hwasan-lam PROPERTIES FOLDER "Compiler-RT Misc")