From 543f4b36a6d65d1b50e3cc29858335e73840523e Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut <leseulartichaut@gmail.com> Date: Fri, 29 May 2020 14:28:31 +0200 Subject: [PATCH 1/2] Document `RUSTFLAGS_STAGE_` --- src/building/bootstrapping.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/building/bootstrapping.md b/src/building/bootstrapping.md index 5bdc8dc6f..178c4977d 100644 --- a/src/building/bootstrapping.md +++ b/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 bootstraping. +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. + +Additionaly, 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 From 16cbe3329d115b4b6074cd58d21053e8fe6bfd81 Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut <leseulartichaut@gmail.com> Date: Fri, 29 May 2020 14:53:25 +0200 Subject: [PATCH 2/2] Fix typos Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com> --- src/building/bootstrapping.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/building/bootstrapping.md b/src/building/bootstrapping.md index 178c4977d..5ba8ef88d 100644 --- a/src/building/bootstrapping.md +++ b/src/building/bootstrapping.md @@ -161,12 +161,12 @@ This `stage2/bin/rustc` compiler is shipped to end-users, along with the ## Passing stage-specific flags to `rustc` -`x.py` allows you to pass stage-specific flags to `rustc` when bootstraping. +`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. -Additionaly, the `RUSTFLAGS_STAGE_NOT_0` variable, as its name suggests, pass +Additionally, the `RUSTFLAGS_STAGE_NOT_0` variable, as its name suggests, pass the given arguments if the stage is not 0. ## Environment Variables