Skip to content

Commit d4581a5

Browse files
jyn514Joshua Nelson
authored and
Joshua Nelson
committed
Document Assemble
1 parent 5ee77ba commit d4581a5

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

Diff for: src/building/bootstrapping.md

+18-5
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,20 @@ Build artifacts include, but are not limited to:
146146

147147
[rlib]: ../serialization.md
148148

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+
149163
#### Examples
150164

151165
- `x.py build --stage 0` means to build with the beta `rustc`.
@@ -166,12 +180,11 @@ Build artifacts include, but are not limited to:
166180
- `x.py test --stage 0 compiler/rustc` builds the compiler but runs no tests:
167181
it's running `cargo test -p rustc`, but cargo doesn't understand Rust's
168182
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`.
173186

174-
[#73519]: https://github.com/rust-lang/rust/issues/73519
187+
[assemble]: #assembling-the-compiler
175188

176189
### Building vs. Running
177190

0 commit comments

Comments
 (0)