[libc-commits] [libc] [libc] Allow hermetic tests to use external startup objects (PR #212557)
Victor Campos via libc-commits
libc-commits at lists.llvm.org
Wed Aug 5 02:44:33 PDT 2026
================
@@ -755,10 +752,24 @@ endfunction(add_integration_test)
# LOADER_ARGS <list of special args to loaders (like the GPU loader)>
# )
function(add_libc_hermetic test_name)
- if(NOT TARGET libc.startup.${LIBC_TARGET_OS}.crt1)
- message(VERBOSE "Skipping ${fq_target_name} as it is not available on ${LIBC_TARGET_OS}.")
+ get_fq_target_name(${test_name} fq_target_name)
+ get_fq_target_name(${test_name}.libc fq_libc_target_name)
+
+ set(startup_target libc.startup.${LIBC_TARGET_OS}.crt1)
+ set(startup_deps "")
----------------
vhscampos wrote:
As far as I can tell, `startup_deps` can ever only be one entity, which is a target name, so there is no reason currently to have the variable as a CMake list.
Substitute all the list handling for `startup_deps` for a simple non-list variable. And rename it to something that represents it better, like `startup_target_dep` (singular).
https://github.com/llvm/llvm-project/pull/212557
More information about the libc-commits
mailing list