Skip to content

Commit e9560cb

Browse files
committed
Building a fully-functional compiler requires x build library
1 parent 570d855 commit e9560cb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,18 @@ Once you've created a `bootstrap.toml`, you are now ready to run
227227
probably the best "go to" command for building a local compiler:
228228

229229
```console
230-
./x build rustc
230+
./x build library
231231
```
232232

233-
What this command does is build `rustc` using the stage0 compiler and stage0 `std`.
233+
What this command does is:
234+
- Build `rustc` using the stage0 compiler and stage0 `std`.
235+
- Build `library` (the standard libraries) with the stage1 compiler that was just built.
236+
- Assemble a working stage1 sysroot, containing the stage1 compiler and stage1 standard libraries.
234237

235238
To build `rustc` with the in-tree `std`, use this command instead:
236239

237240
```console
238-
./x build rustc --stage 2
241+
./x build library --stage 2
239242
```
240243

241244
This final product (stage1 compiler + libs built using that compiler)

0 commit comments

Comments
 (0)