Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e308319

Browse files
Merge pull request #2585 from rust-lang/tshepang/sembr
split overlong sentences
2 parents d03ffd4 + e6dbd25 commit e308319

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,26 @@
33
There are three types of tools you can write in bootstrap:
44

55
- **`Mode::ToolBootstrap`**
6+
67
Use this for tools that don’t need anything from the in-tree compiler and can run with the stage0 `rustc`.
7-
The output is placed in the "bootstrap-tools" directory. This mode is for general-purpose tools built
8-
entirely with the stage0 compiler, including target libraries and only works for stage 0.
8+
The output is placed in the "bootstrap-tools" directory.
9+
This mode is for general-purpose tools built entirely with the stage0 compiler,
10+
including target libraries, and it only works for stage 0.
911

1012
- **`Mode::ToolStd`**
11-
Use this for tools that rely on the locally built std. The output goes into the "stageN-tools" directory.
13+
14+
Use this for tools that rely on the locally built std.
15+
The output goes into the "stageN-tools" directory.
1216
This mode is rarely used, mainly for `compiletest` which requires `libtest`.
1317

1418
- **`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
16-
returned by the tool's [`Step`].
19+
20+
Use this for tools that use the `rustc_private` mechanism,
21+
and thus depend on the locally built `rustc` and its rlib artifacts.
22+
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.
23+
When you choose `Mode::ToolRustcPrivate`, `ToolBuild` implementation takes care of this automatically.
24+
If you need to use the builder’s compiler for something specific,
25+
you can get it from `ToolBuildResult`, which is returned by the tool's [`Step`].
1726

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /