Make flags from *FLAGS* (such as RUSTFLAGS) env. vars. have precedence over flags set by bootstrap#148911
Merged
bors merged 1 commit intorust-lang:mainfrom Nov 16, 2025
Conversation
ce939ab to
456ce9a
Compare
Member
Author
This comment has been minimized.
This comment has been minimized.
456ce9a to
e0750a1
Compare
Kobzol
reviewed
Nov 14, 2025
e0750a1 to
a0015a3
Compare
RUSTFLAGS now have precedence over bootstrap own flags and not the other way around.
Kobzol
reviewed
Nov 16, 2025
…dence over flags set by bootstrap
a0015a3 to
afa24cd
Compare
*FLAGS* (such as RUSTFLAGS) env. vars. have precedence over flags set by bootstrap
Member
Author
|
I addressed all the nits. Also reworded the commit and PR title to better match the updated change description in the tracker. |
Member
|
Thank you! @bors r+ |
Collaborator
bors
added a commit
that referenced
this pull request
Nov 16, 2025
Rollup of 7 pull requests Successful merges: - #148703 (Use `overflow_checks` intrinsic so `IterRangeFrom` yields MAX before panicking in debug) - #148881 (use `cfg_select!` to pick assembly in codegen test) - #148911 (Make flags from `*FLAGS*` (such as `RUSTFLAGS`) env. vars. have precedence over flags set by bootstrap) - #148914 (fix incorrect import in `std_detect` on `aarch64-unknown-openbsd`) - #148971 (Document Error::{new,other} as to be avoided in pre_exec) - #148983 (Use rustc target metadata for build-manifest target lists) - #148995 (add must_use to extract_if methods) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Nov 16, 2025
Rollup merge of #148911 - karolzwolak:bootstrap-rustflags-precedence, r=Kobzol Make flags from `*FLAGS*` (such as `RUSTFLAGS`) env. vars. have precedence over flags set by bootstrap Before this PR extra flags from env variables like `RUSTFLAGS` had lower precedence than bootstrap flags. This PR changes that, and tus makes overriding flags passed to the compiler easier and more reliable. This is technically a breaking change — but it only affects people using these env variables. This change was [discussed on zulip](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Precedence.20of.20RUSTFLAGS.20in.20bootstrap/with/554903280) by members of bootstrap team. r? `@Kobzol`
Muscraft
pushed a commit
to Muscraft/rust
that referenced
this pull request
Nov 17, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#148703 (Use `overflow_checks` intrinsic so `IterRangeFrom` yields MAX before panicking in debug) - rust-lang#148881 (use `cfg_select!` to pick assembly in codegen test) - rust-lang#148911 (Make flags from `*FLAGS*` (such as `RUSTFLAGS`) env. vars. have precedence over flags set by bootstrap) - rust-lang#148914 (fix incorrect import in `std_detect` on `aarch64-unknown-openbsd`) - rust-lang#148971 (Document Error::{new,other} as to be avoided in pre_exec) - rust-lang#148983 (Use rustc target metadata for build-manifest target lists) - rust-lang#148995 (add must_use to extract_if methods) r? `@ghost` `@rustbot` modify labels: rollup
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.
Before this PR extra flags from env variables like
RUSTFLAGShad lower precedence than bootstrap flags. This PR changes that, and tus makes overriding flags passed to the compiler easier and more reliable.This is technically a breaking change — but it only affects people using these env variables.
This change was discussed on zulip by members of bootstrap team.
r? @Kobzol