[libc-commits] [libc] [libc] Add hooks for extra options in running hermetic tests (PR #147931)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 11 07:18:11 PDT 2025
================
@@ -288,7 +288,9 @@ function(create_libc_unittest fq_target_name)
target_include_directories(${fq_build_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
target_include_directories(${fq_build_target_name} PRIVATE ${LIBC_SOURCE_DIR})
target_compile_options(${fq_build_target_name} PRIVATE ${compile_options})
- target_link_options(${fq_build_target_name} PRIVATE ${link_options})
+
+ string(REPLACE " " ";" EXTRA_LINK_OPTIONS "${LIBC_TEST_EXTRA_LINK_OPTIONS}")
+ target_link_options(${fq_build_target_name} PRIVATE ${link_options} ${EXTRA_LINK_OPTIONS})
----------------
lntue wrote:
We already have `LIBC_COMPILE_OPTIONS_DEFAULT` and `LIBC_TEST_COMPILE_OPTIONS_DEFAULT`. Does it work for you, or a separate linking flag is actually needed? If so can we add `LIBC_LINK_OPTIONS_DEFAULT` and `LIBC_TEST_LINK_OPTIONS_DEFAULT` similar to the compile option flags?
https://github.com/llvm/llvm-project/pull/147931
More information about the libc-commits
mailing list