diff options
| author | Who? Me?! <mark-i-m@users.noreply.github.com> | 2019-12-21 07:00:09 -0600 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-12-21 08:00:09 -0500 |
| commit | cd31b973e41aeb56fdc2cc2fa8fd0123200459e7 (patch) | |
| tree | d520a20d05c183ca200f870c2dfc4a9b3212d424 /src/doc/rustc-dev-guide | |
| parent | bf3597ec12e3e676d92173fe4231a17e918f86b3 (diff) | |
| download | rust-cd31b973e41aeb56fdc2cc2fa8fd0123200459e7.tar.gz rust-cd31b973e41aeb56fdc2cc2fa8fd0123200459e7.zip | |
Document rustc internal env vars a little bit (#513)
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/building/bootstrapping.md | 17 |
1 files changed, 17 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 12650907724..5bdc8dc6f18 100644 --- a/src/doc/rustc-dev-guide/src/building/bootstrapping.md +++ b/src/doc/rustc-dev-guide/src/building/bootstrapping.md @@ -159,3 +159,20 @@ links against. This `stage2/bin/rustc` compiler is shipped to end-users, along with the `stage 1 {std,rustc}` artifacts. +## Environment Variables + +During bootstrapping, there are a bunch of compiler-internal environment +variables that are used. If you are trying to run an intermediate version of +`rustc`, sometimes you may need to set some of these environment variables +manually. Otherwise, you get an error like the following: + +```text +thread 'main' panicked at 'RUSTC_STAGE was not set: NotPresent', src/libcore/result.rs:1165:5 +``` + +If `./stageN/bin/rustc` gives an error about environment variables, that +usually means something is quite wrong -- or you're trying to compile e.g. +`librustc` or `libstd` or something that depends on environment variables. In +the unlikely case that you actually need to invoke rustc in such a situation, +you can find the environment variable values by adding the following flag to +your `x.py` command: `--on-fail=print-env`. |
