Skip to content

Commit b5877ab

Browse files
authored
Rollup merge of #146127 - Kobzol:rename-tool-rustc, r=jieyouxu
Rename `ToolRustc` to `ToolRustcPrivate` I think that this name gets the point across much better. r? ````@jieyouxu````
2 parents a49b4dd + a2c5a96 commit b5877ab

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/building/bootstrapping/writing-tools-in-bootstrap.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ There are three types of tools you can write in bootstrap:
1111
Use this for tools that rely on the locally built std. The output goes into the "stageN-tools" directory.
1212
This mode is rarely used, mainly for `compiletest` which requires `libtest`.
1313

14-
- **`Mode::ToolRustc`**
15-
Use this for tools that depend on both the locally built `rustc` and the target `std`. This is more complex than
16-
the other modes because the tool must be built with the same compiler used for `rustc` and placed in the "stageN-tools"
17-
directory. When you choose `Mode::ToolRustc`, `ToolBuild` implementation takes care of this automatically.
18-
If you need to use the builder’s compiler for something specific, you can get it from `ToolBuildResult`, which is
14+
- **`Mode::ToolRustcPrivate`**
15+
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
1916
returned by the tool's [`Step`].
2017

2118
Regardless of the tool type you must return `ToolBuildResult` from the tool’s [`Step`] implementation and use `ToolBuild` inside it.

0 commit comments

Comments
 (0)