llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-libcxx Author: Vitaly Buka (vitalybuka) <details> <summary>Changes</summary> Serialize LLVM_USE_LINKER as a use_linker Lit parameter in libcxx, libcxxabi, and libunwind so test binaries link with -fuse-ld=<linker> instead of falling back to the compiler's default system linker. Assisted-by: Gemini --- Full diff: https://github.com/llvm/llvm-project/pull/237635.diff 4 Files Affected: - (modified) libcxx/test/CMakeLists.txt (+4) - (modified) libcxx/utils/libcxx/test/params.py (+7) - (modified) libcxxabi/test/CMakeLists.txt (+4) - (modified) libunwind/test/CMakeLists.txt (+4) ``````````diff diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index 74524c2330bd00..77cc3e7f9471ec 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -53,6 +53,10 @@ if (LLVM_USE_SANITIZER) serialize_lit_string_param(SERIALIZED_LIT_PARAMS use_sanitizer "${LLVM_USE_SANITIZER}") endif() +if (LLVM_USE_LINKER) + serialize_lit_string_param(SERIALIZED_LIT_PARAMS use_linker "${LLVM_USE_LINKER}") +endif() + serialize_lit_params_list(SERIALIZED_LIT_PARAMS LIBCXX_TEST_PARAMS) include(AddLLVM) # for configure_lit_site_cfg and add_lit_testsuite diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index 951b0a4dd9806e..fff1b9169a93e8 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -347,6 +347,13 @@ def getSuitableClangTidy(cfg): ] ) ), + Parameter( + name="use_linker", + type=str, + default="", + help="An optional linker to use when linking tests via -fuse-ld=<linker>.", + actions=lambda linker: [AddLinkFlag(f"-fuse-ld={linker}")] if linker else [], + ), Parameter( name="enable_experimental", choices=[True, False], diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt index a5ffcbb9d500a3..67556d85b1b5b4 100644 --- a/libcxxabi/test/CMakeLists.txt +++ b/libcxxabi/test/CMakeLists.txt @@ -48,6 +48,10 @@ if (LLVM_USE_SANITIZER) serialize_lit_string_param(SERIALIZED_LIT_PARAMS use_sanitizer "${LLVM_USE_SANITIZER}") endif() +if (LLVM_USE_LINKER) + serialize_lit_string_param(SERIALIZED_LIT_PARAMS use_linker "${LLVM_USE_LINKER}") +endif() + if (CMAKE_CXX_COMPILER_TARGET) serialize_lit_string_param(SERIALIZED_LIT_PARAMS target_triple "${CMAKE_CXX_COMPILER_TARGET}") else() diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt index b97c8b4d1d40d7..c1cce671ddae3e 100644 --- a/libunwind/test/CMakeLists.txt +++ b/libunwind/test/CMakeLists.txt @@ -70,6 +70,10 @@ if (LLVM_USE_SANITIZER) serialize_lit_string_param(SERIALIZED_LIT_PARAMS use_sanitizer "${LLVM_USE_SANITIZER}") endif() +if (LLVM_USE_LINKER) + serialize_lit_string_param(SERIALIZED_LIT_PARAMS use_linker "${LLVM_USE_LINKER}") +endif() + if (CMAKE_CXX_COMPILER_TARGET) serialize_lit_string_param(SERIALIZED_LIT_PARAMS target_triple "${CMAKE_CXX_COMPILER_TARGET}") else() `````````` </details> https://github.com/llvm/llvm-project/pull/237635 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
