Skip to content

Document RUSTFLAGS_STAGE_ bootstrap environment variables #728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/building/bootstrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@ links against.
This `stage2/bin/rustc` compiler is shipped to end-users, along with the
`stage 1 {std,rustc}` artifacts.

## Passing stage-specific flags to `rustc`

`x.py` allows you to pass stage-specific flags to `rustc` when bootstrapping.
The `RUSTFLAGS_STAGE_0`, `RUSTFLAGS_STAGE_1` and `RUSTFLAGS_STAGE_2`
environment variables pass the given flags when building stage 0, 1, and 2
artifacts respectively.

Additionally, the `RUSTFLAGS_STAGE_NOT_0` variable, as its name suggests, pass
the given arguments if the stage is not 0.

## Environment Variables

During bootstrapping, there are a bunch of compiler-internal environment
Expand Down