Unconditionally set static_library even when use_pic is True - #4176
Closed
jakos-sec wants to merge 1 commit into
Closed
Unconditionally set static_library even when use_pic is True#4176jakos-sec wants to merge 1 commit into
jakos-sec wants to merge 1 commit into
Conversation
krasimirgg
self-requested a review
July 28, 2026 08:52
`rules_go` and some other C++ interoperability layers expect static_library to unconditionally be present. When they attempt to link the binary, the Rust archives (libcxx.a, libtokenizers_cpp.a, etc.) were missing from the linker command line, triggering the `ld.lld: error: undefined symbol` build failure, we therefore set those unconditionally.
jakos-sec
force-pushed
the
fix-static-library-pic
branch
from
July 28, 2026 09:27
db27e28 to
5a16448
Compare
krasimirgg
approved these changes
Jul 28, 2026
krasimirgg
left a comment
Collaborator
There was a problem hiding this comment.
Thank you! Chatted offline, and let's see if we can set up an integration test for this using rules_go (seems we need to bump the version of rules_go used by tests first; we can do that independently).
Contributor
Author
|
I can currently no longer reproduce the issues that require static_library to be always set. Let's close this PR and create a new one if the issue is reproducable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rules_goand some other C++ interoperability layers expect static_library to unconditionally be present. When they attempt to link the binary, the Rust archives (libcxx.a, libtokenizers_cpp.a, etc.) were missing from the linker command line, triggering theld.lld: error: undefined symbolbuild failure, we therefore set those unconditionally.