Expand description
Implementation of bootstrap, the Rust build system.
This module, and its descendants, are the implementation of the Rust build system. Most of this build system is backed by Cargo but the outer layer here serves as the ability to orchestrate calling Cargo, sequencing Cargo builds, building artifacts like LLVM, etc. The goals of bootstrap are:
- To be an easily understandable, easily extensible, and maintainable build system.
- Leverage standard tools in the Rust ecosystem to build the compiler, aka crates.io and Cargo.
- A standard interface to build across all platforms, including MSVC
Β§Further information
More documentation can be found in each respective module below, and you can
also check out the src/bootstrap/README.md file for more information.
ModulesΒ§
- cli_
main - bootstrap, the Rust build system
- core π
- utils π
- This module contains integral components of the build and configuration process, providing support for a wide range of tasks and operations such as caching, tarballs, release channels, job management, etc.
MacrosΒ§
- debug
- error
- forward π
- info
- trace
- trace_
io - Create a tracing span around an I/O operation, if tracing is enabled. Note that at least one tracing value field has to be passed to this macro, otherwise it will not compile.
- warn
StructsΒ§
- Build
- Global configuration for the build system.
- Compiler
- A structure representing a Rust compiler.
- Crate π
- Target
AndStage π - An alternative way of specifying what target and stage is involved in some bootstrap activity.
Ideally using a
Compilerdirectly should be preferred.
EnumsΒ§
- CLang
- Codegen
Backend Kind - Represents a codegen backend.
- Dependency
Type - When building Rust various objects are handled differently.
- File
Type - GitRepo
- Mode
- The various βmodesβ of invoking Cargo.
- Remap
Scheme - When
rust.rust_remap_debuginfois requested, the compiler needs to know how to opportunistically unremap compiler vs non-compiler sources. We use two schemes,RemapScheme::CompilerandRemapScheme::NonCompiler. - Test
Target
ConstantsΒ§
- EXTRA_
CHECK_ πCFGS - Extra
--check-cfgto add when building the compiler or tools (Mode restriction, config name, config values (if any)) - LLD_
FILE_ πNAMES - LLD file names for all flavors.
- LLVM_
TOOLS π
FunctionsΒ§
- chmod π
- envify π
- prepare_
behaviour_ dump_ dir - Ensures that the behavior dump directory is properly initialized.