2014-04-01 06:45:37 +08:00
|
|
|
set(PROFILE_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
2014-04-01 07:14:28 +08:00
|
|
|
set(PROFILE_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
2014-04-01 06:45:37 +08:00
|
|
|
|
2016-02-20 01:52:28 +08:00
|
|
|
set(PROFILE_TESTSUITES)
|
2014-04-02 00:05:15 +08:00
|
|
|
set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
2014-04-01 06:45:37 +08:00
|
|
|
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
2019-09-28 04:24:48 +08:00
|
|
|
list(APPEND PROFILE_TEST_DEPS profile llvm-profdata llvm-cov)
|
2021-02-23 14:19:55 +08:00
|
|
|
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
|
2019-07-14 05:02:07 +08:00
|
|
|
list(APPEND PROFILE_TEST_DEPS lld)
|
|
|
|
endif()
|
2014-04-01 06:45:37 +08:00
|
|
|
endif()
|
|
|
|
|
2016-02-20 01:52:28 +08:00
|
|
|
set(PROFILE_TEST_ARCH ${PROFILE_SUPPORTED_ARCH})
|
|
|
|
if(APPLE)
|
|
|
|
darwin_filter_host_archs(PROFILE_SUPPORTED_ARCH PROFILE_TEST_ARCH)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
foreach(arch ${PROFILE_TEST_ARCH})
|
|
|
|
set(PROFILE_TEST_TARGET_ARCH ${arch})
|
2016-11-30 03:25:53 +08:00
|
|
|
get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS)
|
2016-02-20 01:52:28 +08:00
|
|
|
set(CONFIG_NAME Profile-${arch})
|
|
|
|
configure_lit_site_cfg(
|
2019-06-28 04:56:04 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py
|
2016-02-20 01:52:28 +08:00
|
|
|
)
|
|
|
|
list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
|
|
|
|
endforeach()
|
|
|
|
|
2014-04-01 06:45:37 +08:00
|
|
|
add_lit_testsuite(check-profile "Running the profile tests"
|
2016-02-20 01:52:28 +08:00
|
|
|
${PROFILE_TESTSUITES}
|
2014-04-01 06:45:37 +08:00
|
|
|
DEPENDS ${PROFILE_TEST_DEPS})
|
2016-07-12 05:51:56 +08:00
|
|
|
set_target_properties(check-profile PROPERTIES FOLDER "Compiler-RT Misc")
|