Skip to content

Conversation

@karolzwolak
Copy link
Member

Before this PR extra flags from env variables like RUSTFLAGS had lower precedence than bootstrap flags. This 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.

To be exact these the following flags have their precedence increased:

  • RUSTFLAGS
  • RUSTFLAGS_NOT_BOOTSTRAP
  • RUSTFLAGS_BOOTSTRAP
  • CARGOFLAGS_NOT_BOOTSTRAP
  • CARGOFLAGS_BOOTSTRAP
  • CARGO_TARGET_{target}_RUSTFLAGS

r? @Kobzol

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 13, 2025
@karolzwolak karolzwolak force-pushed the bootstrap-rustflags-precedence branch 2 times, most recently from ce939ab to 456ce9a Compare November 13, 2025 15:59
@karolzwolak
Copy link
Member Author

See also #148795 and #148782 for more context.

@rust-log-analyzer

This comment has been minimized.

…otstrap own flags and not the other way around.
@karolzwolak karolzwolak force-pushed the bootstrap-rustflags-precedence branch from 456ce9a to e0750a1 Compare November 13, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants