@@ -146,6 +146,20 @@ Build artifacts include, but are not limited to:
146
146
147
147
[ rlib ] : ../serialization.md
148
148
149
+ #### Assembling the compiler
150
+
151
+ There is a separate step between building the compiler and making it possible
152
+ to run. This step is called _ assembling_ or _ uplifting_ the compiler. It copies
153
+ all the necessary build artifacts from ` build/stageN-sysroot ` to
154
+ ` build/stage(N+1) ` , which allows you to use ` build/stage(N+1) ` as a [ toolchain]
155
+ with ` rustup toolchain link ` .
156
+
157
+ There is [ no way to trigger this step on its own] [ #73519 ] , but ` x.py ` will
158
+ perform it automatically any time you build with stage N+1.
159
+
160
+ [ toolchain ] : https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#creating-a-rustup-toolchain
161
+ [ #73519 ] : https://github.com/rust-lang/rust/issues/73519
162
+
149
163
#### Examples
150
164
151
165
- ` x.py build --stage 0 ` means to build with the beta ` rustc ` .
@@ -166,12 +180,11 @@ Build artifacts include, but are not limited to:
166
180
- ` x.py test --stage 0 compiler/rustc ` builds the compiler but runs no tests:
167
181
it's running ` cargo test -p rustc ` , but cargo doesn't understand Rust's
168
182
tests. You shouldn't need to use this, use ` test ` instead (without arguments).
169
- - ` x.py build --stage 0 compiler/rustc ` builds the compiler, but does not make
170
- it usable: the build artifacts are not assembled into the final compiler
171
- ([ #73519 ] ). Use ` x.py build library/std ` instead, which puts the compiler in
172
- ` stage1/rustc ` .
183
+ - ` x.py build --stage 0 compiler/rustc ` builds the compiler, but does
184
+ not [ assemble] it. Use ` x.py build library/std ` instead, which puts the
185
+ compiler in ` stage1/rustc ` .
173
186
174
- [ #73519 ] : https://github.com/rust-lang/rust/issues/73519
187
+ [ assemble ] : #assembling-the-compiler
175
188
176
189
### Building vs. Running
177
190
0 commit comments