diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-09-16 10:25:43 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-16 10:25:43 +1000 |
| commit | cc315a8fba7b8a49019308838df1a92a5e3fb591 (patch) | |
| tree | b2fa1e58406e6b8244a1869b37c2da57c955305b /src/bootstrap | |
| parent | 7cad097408b161837bb4f62adcf07ed7b6870461 (diff) | |
| parent | b8cb80cf80572e9d287445af16608b68ec436099 (diff) | |
| download | rust-cc315a8fba7b8a49019308838df1a92a5e3fb591.tar.gz rust-cc315a8fba7b8a49019308838df1a92a5e3fb591.zip | |
Rollup merge of #146608 - lolbinarycat:bootstrap-readme, r=Kobzol
improve internal bootstrap docs Mainly focused on making it easier to figure out how tools get built without having to read the `bootstrap_tool!` macro, but also added some subdirs of `build/` to the readme.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/README.md | 15 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/tool.rs | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/bootstrap/README.md b/src/bootstrap/README.md index 2965174b45b..12e09cb07db 100644 --- a/src/bootstrap/README.md +++ b/src/bootstrap/README.md @@ -63,6 +63,21 @@ build/ debug/ release/ + # Build directory for various tools like `typos` that are only ever + # built for the host system, and always with stage0 cargo. + misc-tools/ + bin/ + target/ + + # Directory where js dependencies like tsc and eslint are stored. + node_modules/ + .bin/ + + # Copy of package.json and package-lock.json, because npm requires these + # to be in the same directory as `node_modules`. + package.json + package-lock.json + # Output of the dist-related steps like dist-std, dist-rustc, and dist-docs dist/ diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index dcc4898cae1..4f096d50ea5 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -394,6 +394,9 @@ macro_rules! bootstrap_tool { } impl<'a> Builder<'a> { + /// Ensure a tool is built, then get the path to its executable. + /// + /// The actual building, if any, will be handled via [`ToolBuild`]. pub fn tool_exe(&self, tool: Tool) -> PathBuf { match tool { $(Tool::$name => @@ -1552,6 +1555,8 @@ pub const TEST_FLOAT_PARSE_ALLOW_FEATURES: &str = "f16,cfg_target_has_reliable_f impl Builder<'_> { /// Gets a `BootstrapCommand` which is ready to run `tool` in `stage` built for /// `host`. + /// + /// This also ensures that the given tool is built (using [`ToolBuild`]). pub fn tool_cmd(&self, tool: Tool) -> BootstrapCommand { let mut cmd = command(self.tool_exe(tool)); let compiler = self.compiler(0, self.config.host_target); |
