-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2263 from BoxyUwU/rustc-pull2
Rustc pull
- Loading branch information
Showing
10 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
124cc92199ffa924f6b4c7cc819a85b65e0c3984 | ||
4ecd70ddd1039a3954056c1071e40278048476fa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Writing tools in Bootstrap | ||
|
||
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 "stage0-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. | ||
|
||
- **`Mode::ToolStd`** | ||
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::ToolRustc`** | ||
Use this for tools that depend on both the locally built `rustc` and the target `std`. 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::ToolRustc`, `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. | ||
|
||
[`Step`]: https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/trait.Step.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters