File tree 1 file changed +18
-0
lines changed
src/bootstrap/src/core/build_steps
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ //! This module handles building and managing various tools in bootstrap
2
+ //! build system.
3
+ //!
4
+ //! **What It Does**
5
+ //! - Defines how tools are built, configured and installed.
6
+ //! - Manages tool dependencies and build steps.
7
+ //! - Copies built tool binaries to the correct locations.
8
+ //!
9
+ //! Each Rust tool **MUST** utilize `ToolBuild` inside their `Step` logic,
10
+ //! return `ToolBuildResult` and should never prepare `cargo` invocations manually.
11
+
1
12
use std:: path:: PathBuf ;
2
13
use std:: { env, fs} ;
3
14
@@ -64,10 +75,16 @@ impl Builder<'_> {
64
75
}
65
76
}
66
77
78
+ /// Result of the tool build process. Each `Step` in this module is responsible
79
+ /// for using this type as `type Output = ToolBuildResult;`
67
80
#[ derive( Clone ) ]
68
81
pub struct ToolBuildResult {
82
+ /// Executable path of the corresponding tool that was built.
69
83
pub tool_path : PathBuf ,
84
+ /// Compiler used to build the tool. For non-`ToolRustc` tools this is equal to `target_compiler`.
85
+ /// For `ToolRustc` this is one stage before of the `target_compiler`.
70
86
pub build_compiler : Compiler ,
87
+ /// Target compiler passed to `Step`.
71
88
pub target_compiler : Compiler ,
72
89
}
73
90
@@ -274,6 +291,7 @@ pub fn prepare_tool_cargo(
274
291
cargo
275
292
}
276
293
294
+ /// Handle stage-off logic for `ToolRustc` tools when necessary.
277
295
pub ( crate ) fn get_tool_rustc_compiler (
278
296
builder : & Builder < ' _ > ,
279
297
target_compiler : Compiler ,
You can’t perform that action at this time.
0 commit comments