1 configure_lit_site_cfg(
2 ${CMAKE_CURRENT_SOURCE_DIR}/lit.common.configured.in
3 ${CMAKE_CURRENT_BINARY_DIR}/lit.common.configured)
5 # BlocksRuntime and builtins testsuites are not yet ported to lit.
6 # add_subdirectory(BlocksRuntime)
7 # add_subdirectory(builtins)
9 set(SANITIZER_COMMON_LIT_TEST_DEPS)
10 # When ANDROID, we build tests with the host compiler (i.e. CMAKE_C_COMPILER),
11 # and run tests with tools from the host toolchain.
13 if(NOT COMPILER_RT_STANDALONE_BUILD)
14 # Use LLVM utils and Clang from the same build tree.
15 list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS
16 clang clang-headers FileCheck count not llvm-nm llvm-symbolizer
20 list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS SanitizerLintCheck)
24 # Run sanitizer tests only if we're sure that clang would produce
26 if(COMPILER_RT_CAN_EXECUTE_TESTS)
27 if(ASAN_SUPPORTED_ARCH OR ANDROID)
28 add_subdirectory(asan)
30 if(DFSAN_SUPPORTED_ARCH)
31 add_subdirectory(dfsan)
33 if(LSAN_SUPPORTED_ARCH)
34 add_subdirectory(lsan)
36 if(MSAN_SUPPORTED_ARCH)
37 add_subdirectory(msan)
39 if(PROFILE_SUPPORTED_ARCH)
40 add_subdirectory(profile)
42 if(SANITIZER_COMMON_SUPPORTED_ARCH)
43 add_subdirectory(sanitizer_common)
45 if(TSAN_SUPPORTED_ARCH)
46 add_subdirectory(tsan)
48 if(UBSAN_SUPPORTED_ARCH)
49 add_subdirectory(ubsan)
53 if(COMPILER_RT_STANDALONE_BUILD)
54 # Now that we've traversed all the directories and know all the lit testsuites,
55 # introduce a rule to run to run all of them.
56 get_property(LLVM_LIT_TESTSUITES GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
57 get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
58 add_lit_target(check-all
59 "Running all regression tests"
60 ${LLVM_LIT_TESTSUITES}
61 DEPENDS ${LLVM_LIT_DEPENDS})