Skip to content

Commit 55c92da

Browse files
Document RUSTFLAGS_STAGE_ bootstrap environment variables (#728)
* Document `RUSTFLAGS_STAGE_` * Fix typos Co-authored-by: Yuki Okushi <[email protected]>
1 parent c9850bb commit 55c92da

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/building/bootstrapping.md

+10
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@ links against.
159159
This `stage2/bin/rustc` compiler is shipped to end-users, along with the
160160
`stage 1 {std,rustc}` artifacts.
161161

162+
## Passing stage-specific flags to `rustc`
163+
164+
`x.py` allows you to pass stage-specific flags to `rustc` when bootstrapping.
165+
The `RUSTFLAGS_STAGE_0`, `RUSTFLAGS_STAGE_1` and `RUSTFLAGS_STAGE_2`
166+
environment variables pass the given flags when building stage 0, 1, and 2
167+
artifacts respectively.
168+
169+
Additionally, the `RUSTFLAGS_STAGE_NOT_0` variable, as its name suggests, pass
170+
the given arguments if the stage is not 0.
171+
162172
## Environment Variables
163173

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

0 commit comments

Comments
 (0)