[PATCH] D149674: [libc][bazel] static link test targets

Michael Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 11:27:39 PDT 2023


michaelrj created this revision.
michaelrj added reviewers: sivachandra, gchatelet.
Herald added subscribers: ecnelises, tschuett.
Herald added a project: All.
michaelrj requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This solves issues caused by the symbols for internal components being
marked as hidden. When dynamically linked, the tests of internal
components, such as printf_parser_test, fail due to the symbols being
unavailable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149674

Files:
  utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl


Index: utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
===================================================================
--- utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
+++ utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
@@ -33,5 +33,6 @@
             "//libc/test/UnitTest:LibcUnitTest",
         ] + deps,
         features = ["-link_llvmlibc"],  # Do not link libllvmlibc.a
+        linkstatic = 1,
         **kwargs
     )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149674.518815.patch
Type: text/x-patch
Size: 478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230502/87fab181/attachment.bin>


More information about the llvm-commits mailing list