bootstrap: expand '@argfile' arguments to rustc shim#159036
Merged
rust-bors[bot] merged 1 commit intoJul 10, 2026
Merged
Conversation
Collaborator
|
|
fde5874 to
b6ec7d2
Compare
Kobzol
reviewed
Jul 9, 2026
When cargo invokes `rustc`, if the command line exceeds some system defined limit, `cargo` will try again and pass the arguments in an argfile. When the bootstrap rustc shim tries to detect `--target`, it does not account for `@argfile` arguments. As a result, the shim doesn't find `--target` and incorrectly sets `is_build_script` to true, as well as passing the `RUSTC_HOST_FLAGS` to the underlying compiler This PR makes the shim read all the arguments from every `@argfile`. Previous work already updated the shim to use `ArgFileCommand` to pass arguments down to the underlying `rustc`.
b6ec7d2 to
e7d2e3d
Compare
Member
|
Thank you! :) @bors r+ rollup |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 9, 2026
…le, r=Kobzol bootstrap: expand '@argfile' arguments to rustc shim When cargo invokes `rustc`, if the command line exceeds some system defined limit, `cargo` will try again and pass the arguments in an argfile. When the bootstrap rustc shim tries to detect `--target`, it does not account for `@argfile` arguments. As a result, the shim doesn't find `--target` and incorrectly sets `is_build_script` to true, as well as passing the `RUSTC_HOST_FLAGS` to the underlying compiler This PR makes the shim read all the arguments from every `@argfile`. Previous work rust-lang#155439 already updated the shim to use `ArgFileCommand` to pass arguments down to the underlying `rustc`. r? kobzol
This was referenced Jul 9, 2026
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 10, 2026
Rollup of 24 pull requests Successful merges: - #150946 (intrinsics: Add a fallback for non-const libm float functions) - #158541 (Move `std::io::Write` to `core::io`) - #156027 (Consider captured regions for opaque type region liveness.) - #156370 (Reject linked dylib EII default overrides) - #156508 (Infer all anonymous lifetimes in assoc consts as `'static`) - #157561 (rustdoc: do not include extra stuff in span) - #158617 (allow mGCA const arguments to fall back to anon consts) - #158645 (Fix splat ICEs and ban it in closures) - #158859 (Improve `-Zls` diagnostic message on `.rs` files) - #158988 (Redo `TokenStreamIter`) - #158347 (Improve generic parameters handling for #[diagnostic::on_const]) - #158384 (Allow BackwardIncompatibleDropHint in polonius legacy) - #158722 (delegation: do not always inherit `ConstArgHasType` predicates) - #158739 (view-types: HIR lowering) - #158877 (borrowck: Keep returned `path` from `best_blame_constraint()` consistent) - #158883 (tests: fix enum-match.rs to handle LLVM 23) - #158886 (Add documentation for the `no_std` attribute) - #158940 (Implement feature `char_to_u32`) - #158951 (Merge three `MaxUniverse`s into one) - #158960 (Fix bootstrap submodule path prefix matching) - #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places") - #158995 (Use REST API in linkchecker script) - #158996 ([compiler] Implement `PartialOrd` via `Ord` for `Span` and newtype_indexes) - #159036 (bootstrap: expand '@argfile' arguments to rustc shim)
rust-timer
added a commit
that referenced
this pull request
Jul 10, 2026
Rollup merge of #159036 - lambdageek:rustc-shim-expand-argfile, r=Kobzol bootstrap: expand '@argfile' arguments to rustc shim When cargo invokes `rustc`, if the command line exceeds some system defined limit, `cargo` will try again and pass the arguments in an argfile. When the bootstrap rustc shim tries to detect `--target`, it does not account for `@argfile` arguments. As a result, the shim doesn't find `--target` and incorrectly sets `is_build_script` to true, as well as passing the `RUSTC_HOST_FLAGS` to the underlying compiler This PR makes the shim read all the arguments from every `@argfile`. Previous work #155439 already updated the shim to use `ArgFileCommand` to pass arguments down to the underlying `rustc`. r? kobzol
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.
When cargo invokes
rustc, if the command line exceeds some system defined limit,cargowill try again and pass the arguments in an argfile.When the bootstrap rustc shim tries to detect
--target, it does not account for@argfilearguments. As a result, the shim doesn't find--targetand incorrectly setsis_build_scriptto true, as well as passing theRUSTC_HOST_FLAGSto the underlying compilerThis PR makes the shim read all the arguments from every
@argfile.Previous work #155439 already updated the shim to use
ArgFileCommandto pass arguments down to the underlyingrustc.r? kobzol