File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -159,3 +159,20 @@ links against.
159
159
This ` stage2/bin/rustc ` compiler is shipped to end-users, along with the
160
160
` stage 1 {std,rustc} ` artifacts.
161
161
162
+ ## Environment Variables
163
+
164
+ During bootstrapping, there are a bunch of compiler-internal environment
165
+ variables that are used. If you are trying to run an intermediate version of
166
+ ` rustc ` , sometimes you may need to set some of these environment variables
167
+ manually. Otherwise, you get an error like the following:
168
+
169
+ ``` text
170
+ thread 'main' panicked at 'RUSTC_STAGE was not set: NotPresent', src/libcore/result.rs:1165:5
171
+ ```
172
+
173
+ If ` ./stageN/bin/rustc ` gives an error about environment variables, that
174
+ usually means something is quite wrong -- or you're trying to compile e.g.
175
+ ` librustc ` or ` libstd ` or something that depends on environment variables. In
176
+ the unlikely case that you actually need to invoke rustc in such a situation,
177
+ you can find the environment variable values by adding the following flag to
178
+ your ` x.py ` command: ` --on-fail=print-env ` .
You can’t perform that action at this time.
0 commit comments