[runtimes] Create check- targets for LLVM_RUNTIME_DISTRIBUTION_COMPONENTS

The sub-component check targets won't be automatically created until the
runtime configurations have run (and the main LLVM configure has rerun
afterwards). Work around this by creating check- targets for components
in LLVM_RUNTIME_DISTRIBUTION_COMPONENTS as well (and making sure they
get the proper test dependencies).

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D138967
This commit is contained in:
Shoaib Meenai 2022-11-29 17:41:57 -08:00
parent a323e515ee
commit 8947f26b88
1 changed files with 9 additions and 1 deletions

View File

@ -301,7 +301,15 @@ function(runtime_register_target name target)
set(check-runtimes-${name} check-runtimes)
list(APPEND ${name}_test_targets runtimes-test-depends-${name} check-runtimes-${name})
list(APPEND test_targets ${${name}_test_targets})
foreach(target_name IN LISTS SUB_CHECK_TARGETS)
set(component_check_targets)
foreach(component IN LISTS LLVM_RUNTIME_DISTRIBUTION_COMPONENTS)
if(NOT "check-${component}" IN_LIST SUB_CHECK_TARGETS)
list(APPEND component_check_targets "check-${component}")
endif()
endforeach()
foreach(target_name IN LISTS SUB_CHECK_TARGETS component_check_targets)
set(${target_name}-${name} ${target_name})
list(APPEND ${name}_test_targets ${target_name}-${name})
list(APPEND test_targets ${target_name}-${name})