diff options
| author | binarycat <binarycat@envs.net> | 2025-09-15 13:38:04 -0500 |
|---|---|---|
| committer | binarycat <binarycat@envs.net> | 2025-09-15 13:38:04 -0500 |
| commit | b8cb80cf80572e9d287445af16608b68ec436099 (patch) | |
| tree | 0f709b38028b31abf7ed4fa5151b6c6a701c5709 | |
| parent | 52618eb338609df44978b0ca4451ab7941fd1c7a (diff) | |
| download | rust-b8cb80cf80572e9d287445af16608b68ec436099.tar.gz rust-b8cb80cf80572e9d287445af16608b68ec436099.zip | |
improve internal bootstrap docs
| -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); |
