@@ -448,3 +448,46 @@ This is an incomplete reference for the outputs generated by bootstrap:
448
448
| copy ` rustdoc ` | ` build/HOST/stage2/bin ` |
449
449
450
450
` --stage=2 ` stops here.
451
+
452
+ ### Clarification of build command's stdout
453
+
454
+ In this part, we will investigate the build command's stdout in an action
455
+ (similar, but more detailed and complete documentation compare to topic above).
456
+ When you execute ` x.py build --dry-run ` command, the build output will be something
457
+ like the following:
458
+
459
+ ``` text
460
+ Building stage0 library artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
461
+ Copying stage0 library from stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu)
462
+ Building stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
463
+ Copying stage0 rustc from stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu)
464
+ Assembling stage1 compiler (aarch64-unknown-linux-gnu)
465
+ Building stage1 library artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
466
+ Copying stage1 library from stage1 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu)
467
+ Building stage1 tool rust-analyzer-proc-macro-srv (aarch64-unknown-linux-gnu)
468
+ Building rustdoc for stage1 (aarch64-unknown-linux-gnu)
469
+ ```
470
+
471
+ #### Building stage0 {std,test,compiler} artifacts
472
+
473
+ These steps use the provided (downloaded, usually) compiler to compile the
474
+ local Rust source into libraries we can use.
475
+
476
+ #### Copying stage0 {std,test,rustc}
477
+
478
+ This copies the build output from Cargo into
479
+ ` build/$HOST/stage0-sysroot/lib/rustlib/$ARCH/lib ` .
480
+ [ comment] : FIXME: this step's documentation should be expanded -- the information already here may be incorrect.
481
+
482
+ #### Assembling stage1 compiler
483
+
484
+ This copies the libraries we built in "building stage0 ... artifacts" into
485
+ the stage1 compiler's lib directory. These are the host libraries that the
486
+ compiler itself uses to run. These aren't actually used by artifacts the new
487
+ compiler generates. This step also copies the rustc and rustdoc binaries we
488
+ generated into ` build/$HOST/stage/bin ` .
489
+
490
+ The stage1/bin/rustc is a fully functional compiler, but it doesn't yet have
491
+ any libraries to link built binaries or libraries to. The next 3 steps will
492
+ provide those libraries for it; they are mostly equivalent to constructing
493
+ the stage1/bin compiler so we don't go through them individually.
0 commit comments