Add runtime_libs as rust compile action inputs#3741
Merged
UebelAndre merged 3 commits intobazelbuild:mainfrom Nov 25, 2025
Merged
Add runtime_libs as rust compile action inputs#3741UebelAndre merged 3 commits intobazelbuild:mainfrom
UebelAndre merged 3 commits intobazelbuild:mainfrom
Conversation
dzbarsky
commented
Nov 25, 2025
| args.add_all(make_link_flags_args, map_each = make_link_flags) | ||
|
|
||
| args.add_all(linkstamp_outs, before_each = "-C", format_each = "link-args=%s") | ||
| args.add_all(linkstamp_outs, format_each = "-Clink-args=%s") |
dzbarsky
commented
Nov 25, 2025
| if crate_type in ["dylib", "cdylib"]: | ||
| # For shared libraries we want to link C++ runtime library dynamically | ||
| # (for example libstdc++.so or libc++.so). | ||
| args.add_all( |
Contributor
Author
There was a problem hiding this comment.
all of this is drive-by cleanup; I initially thought they needed to be passed by full path and then discovered they weren't in the sandbox at all :)
UebelAndre
requested changes
Nov 25, 2025
8cb02aa to
deb6664
Compare
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.
The current handling of
static_runtime_lib/dynamic_runtime_libis broken because it never adds these libs to the action. I think it assumes they are coming fromcc_toolchain.all_filesbut that's not necessarily a safe assumption; when these libs are built from source there's no reason to force all actions to depend on both of them via the toolchain files if we may not end up using them. (We hit this scenario in https://github.com/cerisier/toolchains_llvm_bootstrapped)