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 # Profile tests rely on the compiler-rt-headers being in the resource directory
6 set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS} compiler-rt-headers)
7 list(APPEND PROFILE_TEST_DEPS profile)
8 if(NOT COMPILER_RT_STANDALONE_BUILD)
9 list(APPEND PROFILE_TEST_DEPS llvm-profdata llvm-cov)
10 if(NOT APPLE AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
11 list(APPEND PROFILE_TEST_DEPS lld)
15 set(PROFILE_TEST_ARCH ${PROFILE_SUPPORTED_ARCH})
17 darwin_filter_host_archs(PROFILE_SUPPORTED_ARCH PROFILE_TEST_ARCH)
20 pythonize_bool(LLVM_ENABLE_CURL)
22 foreach(arch ${PROFILE_TEST_ARCH})
23 set(PROFILE_TEST_TARGET_ARCH ${arch})
24 get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS)
25 set(CONFIG_NAME Profile-${arch})
26 configure_lit_site_cfg(
27 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
28 ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py
30 list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
33 add_lit_testsuite(check-profile "Running the profile tests"
35 DEPENDS ${PROFILE_TEST_DEPS})
36 set_target_properties(check-profile PROPERTIES FOLDER "Compiler-RT Misc")