about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorLeSeulArtichaut <leseulartichaut@gmail.com>2020-05-29 18:20:24 +0200
committerGitHub <noreply@github.com>2020-05-30 01:20:24 +0900
commit9d0149ed37c47eef29d2a717814a37227dd909aa (patch)
tree01f75c2e6e3e756f4a832c442fb257c6141154b0 /src/doc/rustc-dev-guide
parente371b6055b48bd17d2f8d572b4bb6e99b897eb69 (diff)
downloadrust-9d0149ed37c47eef29d2a717814a37227dd909aa.tar.gz
rust-9d0149ed37c47eef29d2a717814a37227dd909aa.zip
Document `RUSTFLAGS_STAGE_` bootstrap environment variables (#728)
* Document `RUSTFLAGS_STAGE_`

* Fix typos

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/building/bootstrapping.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/building/bootstrapping.md b/src/doc/rustc-dev-guide/src/building/bootstrapping.md
index 5bdc8dc6f18..5ba8ef88d37 100644
--- a/src/doc/rustc-dev-guide/src/building/bootstrapping.md
+++ b/src/doc/rustc-dev-guide/src/building/bootstrapping.md
@@ -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