diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-09-08 06:56:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-08 06:56:12 +0200 |
| commit | 8c324de311b4fae04679fd4e033b2377c4bdbb9d (patch) | |
| tree | fa38973f7c2d780312bf6a420da200ae58688914 /src/doc/rustc-dev-guide | |
| parent | 30ad58fc1df8d369602e64a64f20ea8107461eb7 (diff) | |
| parent | 94da52007bf7583a833911c92cb58f9e90544542 (diff) | |
| download | rust-8c324de311b4fae04679fd4e033b2377c4bdbb9d.tar.gz rust-8c324de311b4fae04679fd4e033b2377c4bdbb9d.zip | |
Merge pull request #2585 from rust-lang/tshepang/sembr
split overlong sentences
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/building/bootstrapping/writing-tools-in-bootstrap.md | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/doc/rustc-dev-guide/src/building/bootstrapping/writing-tools-in-bootstrap.md b/src/doc/rustc-dev-guide/src/building/bootstrapping/writing-tools-in-bootstrap.md index c3660e24b15..8250a6f3b51 100644 --- a/src/doc/rustc-dev-guide/src/building/bootstrapping/writing-tools-in-bootstrap.md +++ b/src/doc/rustc-dev-guide/src/building/bootstrapping/writing-tools-in-bootstrap.md @@ -3,17 +3,26 @@ There are three types of tools you can write in bootstrap: - **`Mode::ToolBootstrap`** + Use this for tools that don’t need anything from the in-tree compiler and can run with the stage0 `rustc`. - The output is placed in the "bootstrap-tools" directory. This mode is for general-purpose tools built - entirely with the stage0 compiler, including target libraries and only works for stage 0. + The output is placed in the "bootstrap-tools" directory. + This mode is for general-purpose tools built entirely with the stage0 compiler, + including target libraries, and it only works for stage 0. - **`Mode::ToolStd`** - Use this for tools that rely on the locally built std. The output goes into the "stageN-tools" directory. + + Use this for tools that rely on the locally built std. + The output goes into the "stageN-tools" directory. This mode is rarely used, mainly for `compiletest` which requires `libtest`. - **`Mode::ToolRustcPrivate`** - Use this for tools that use the `rustc_private` mechanism, and thus depend on the locally built `rustc` and its rlib artifacts. This is more complex than the other modes because the tool must be built with the same compiler used for `rustc` and placed in the "stageN-tools" directory. When you choose `Mode::ToolRustcPrivate`, `ToolBuild` implementation takes care of this automatically. If you need to use the builder’s compiler for something specific, you can get it from `ToolBuildResult`, which is - returned by the tool's [`Step`]. + + Use this for tools that use the `rustc_private` mechanism, + and thus depend on the locally built `rustc` and its rlib artifacts. + This is more complex than the other modes because the tool must be built with the same compiler used for `rustc` and placed in the "stageN-tools" directory. + When you choose `Mode::ToolRustcPrivate`, `ToolBuild` implementation takes care of this automatically. + If you need to use the builder’s compiler for something specific, + you can get it from `ToolBuildResult`, which is returned by the tool's [`Step`]. Regardless of the tool type you must return `ToolBuildResult` from the tool’s [`Step`] implementation and use `ToolBuild` inside it. |
