[libc] Skip tests that depend on undefined targets

When we search through the dependencies for a test we somtimes query
`get_target_property` on a target that has not been defined. This is the
case for targets that have minimal entrypoints defined such as the WIP
GPU target. This patch changes all tests whose dependencies are
undefined to be skipped entirely.

Reviewed By: sivachandra, lntue, michaelrj

Differential Revision: https://reviews.llvm.org/D139216
This commit is contained in:
Joseph Huber 2022-12-02 13:30:35 -06:00
parent 8d23614a29
commit c648112592
1 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,11 @@ function(get_object_files_for_test result skipped_entrypoints_list)
set(object_files "")
set(skipped_list "")
foreach(dep IN LISTS ARGN)
if (NOT TARGET ${dep})
# Skip any tests whose dependencies have not been defined.
list(APPEND skipped_list ${dep})
continue()
endif()
get_target_property(dep_type ${dep} "TARGET_TYPE")
if(NOT dep_type)
# Target for which TARGET_TYPE property is not set do not