Expand description
This module handles building and managing various tools in bootstrap build system.
What It Does
- Defines how tools are built, configured and installed.
- Manages tool dependencies and build steps.
- Copies built tool binaries to the correct locations.
Each Rust tool MUST utilize ToolBuild
inside their Step
logic,
return ToolBuildResult
and should never prepare cargo
invocations manually.
Macrosยง
- bootstrap_
tool ๐ - tool_
rustc_ ๐extended - Creates a step that builds an extended
Mode::ToolRustcPrivate
tool and installs it into the sysroot of a corresponding compiler.
Structsยง
- Build
Manifest - Built
LldWrapper - Represents a built LldWrapper, the
lld-wrapper
tool itself, and a directory containing a build of LLD. - Bump
Stage0 - Cargo
- Builds the cargo tool. Note that it can be built using a stable compiler.
- Cargo
Clippy - Cargo
Miri - Cargo
Test - Cargofmt
- Clippy
- Collect
License Metadata - Compiletest
- Coverage
Dump - Error
Index - Features
Status Dump - Generate
Copyright - Generate
Windows Sys - Html
Checker - Json
DocCk - Json
DocLint - Libcxx
Version Tool - Linkchecker
- Lint
Docs - LldWrapper
- Llvm
Bitcode Linker - Miri
- Optimized
Dist - Remote
Test Client - Remote
Test Server - Replace
Version Placeholder - RunMake
Support - Rust
Analyzer - Rust
Analyzer Proc Macro Srv - Rust
Installer - Rustbook
- Rustc
Perf - The rustc-perf benchmark suite, which is added
as a submodule at
src/tools/rustc-perf
. - Rustc
Private Compilers - Represents which compilers are involved in the compilation of a tool
that depends on compiler internals (
rustc_private
). Their compilation looks like this: - Rustdoc
- Represents
Rustdoc
that either comes from the external stage0 sysroot or that is built locally. Rustdoc is special, because it both essentially corresponds to aCompiler
(that can be externally provided), but also to aToolRustcPrivate
tool. - RustdocGUI
Test - Rustdoc
Theme - Rustfmt
- Tidy
- Tool
Build ๐ - Tool
Build Result - Result of the tool build process. Each
Step
in this module is responsible for using this type astype Output = ToolBuildResult;
- Unicode
Table Generator - Unstable
Book Gen - Wasm
Component Ld - Builds the
wasm-component-ld
linker wrapper, which is shipped with rustc to be executed on the host platform where rustc runs.
Enumsยง
- Libcxx
Version - Source
Type - Tool
- Tool
Artifact Kind - Tool
Target Build Mode - Determines how to build a
ToolTarget
, i.e. which compiler should be used to compile it. The compiler stage is automatically bumped if we need to cross-compile a stage 1 tool.
Constantsยง
Staticsยง
- SUBMODULES_
FOR_ RUSTBOOK - These are the submodules that are required for rustbook to work due to depending on mdbook plugins.
Functionsยง
- build_
extended_ ๐rustc_ tool - copy_
link_ ๐tool_ bin - Links a built tool binary with the given
name
from the build directory to the tools directory. - copy_
lld_ ๐artifacts - get_
tool_ ๐target_ compiler - Returns compiler that is able to compile a
ToolTarget
tool with the givenmode
. - prepare_
tool_ cargo - should_
run_ ๐extended_ rustc_ tool