1 set(PROFILE_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
2 set(PROFILE_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
4 set(PROFILE_TESTSUITES)
5 set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
6 if(NOT COMPILER_RT_STANDALONE_BUILD)
7 list(APPEND PROFILE_TEST_DEPS profile llvm-profdata llvm-cov)
10 set(PROFILE_TEST_ARCH ${PROFILE_SUPPORTED_ARCH})
12 darwin_filter_host_archs(PROFILE_SUPPORTED_ARCH PROFILE_TEST_ARCH)
15 foreach(arch ${PROFILE_TEST_ARCH})
16 set(PROFILE_TEST_TARGET_ARCH ${arch})
17 get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS)
18 set(CONFIG_NAME Profile-${arch})
19 configure_lit_site_cfg(
20 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
21 ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py
23 list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
26 add_lit_testsuite(check-profile "Running the profile tests"
28 DEPENDS ${PROFILE_TEST_DEPS})
29 set_target_properties(check-profile PROPERTIES FOLDER "Compiler-RT Misc")