Module tool

Source
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_extended ๐Ÿ”’

Structsยง

BuildManifest
BumpStage0
Cargo
CargoClippy
CargoMiri
CargoTest
Cargofmt
Clippy
CollectLicenseMetadata
Compiletest
CoverageDump
ErrorIndex
FeaturesStatusDump
GenerateCopyright
GenerateWindowsSys
HtmlChecker
JsonDocCk
JsonDocLint
LibcxxVersionTool
Linkchecker
LintDocs
LldWrapper
LlvmBitcodeLinker
Miri
OptimizedDist
RemoteTestClient
RemoteTestServer
ReplaceVersionPlaceholder
RunMakeSupport
RustAnalyzer
RustAnalyzerProcMacroSrv
RustInstaller
Rustbook
RustcPerf
The rustc-perf benchmark suite, which is added as a submodule at src/tools/rustc-perf.
Rustdoc
RustdocGUITest
RustdocTheme
Rustfmt
SuggestTests
TestFloatParse
Tidy
ToolBuild ๐Ÿ”’
ToolBuildResult
Result of the tool build process. Each Step in this module is responsible for using this type as type Output = ToolBuildResult;
UnicodeTableGenerator
UnstableBookGen
WasmComponentLd

Enumsยง

LibcxxVersion
SourceType
Tool
ToolArtifactKind

Staticsยง

SUBMODULES_FOR_RUSTBOOK
These are the submodules that are required for rustbook to work due to depending on mdbook plugins.

Functionsยง

copy_link_tool_bin ๐Ÿ”’
Links a built tool binary with the given name from the build directory to the tools directory.
get_tool_rustc_compiler ๐Ÿ”’
Handle stage-off logic for ToolRustc tools when necessary.
prepare_tool_cargo
run_tool_build_step ๐Ÿ”’
should_run_tool_build_step ๐Ÿ”’