Expand description
Implementation of compiling various phases of the compiler and standard library.
This module contains some of the real meat in the bootstrap build system which is where Cargo is used to compile the standard library, libtest, and the compiler. This module is also responsible for assembling the sysroot as it goes along from the output of the previous stage.
StructsΒ§
- Assemble
- Prepare a compiler sysroot.
- Built
Rustc - Represents information about a built rustc.
- Cargo
Target - Cranelift
Codegen Backend - GccCodegen
Backend - GccCodegen
Backend Output - Output of the
compile::GccCodegenBackend
step. It includes the path to the libgccjit library on which this backend depends. - Rustc
- Build rustc using the passed
build_compiler
. - Rustc
Link π RustcLink
copies compiler rlibs from a rustc build into a compiler sysroot. It works with (potentially up to) three compilers:- Startup
Objects - Std
- Build a standard library for the given
target
using the givenbuild_compiler
. - StdLink
- Link all libstd rlibs/dylibs into a sysroot of
target_compiler
. - Sysroot
EnumsΒ§
FunctionsΒ§
- add_
to_ sysroot - Link some files into a rustc sysroot.
- apple_
darwin_ πsign_ file - apple_
darwin_ πupdate_ library_ name - compiler_
file - compiler_
rt_ πfor_ profiler - Tries to find LLVMβs
compiler-rt
source directory, for buildinglibrary/profiler_builtins
. - copy_
and_ πstamp - copy_
codegen_ πbackends_ to_ sysroot - Creates the
codegen-backends
folder for a compiler thatβs about to be assembled as a complete compiler. - copy_
llvm_ πlibunwind - copy_
sanitizers π - Copies sanitizer runtime libraries into target libdir.
- copy_
self_ πcontained_ objects - Copies third party objects needed by various targets for self-contained linkage.
- copy_
third_ πparty_ objects - Copies third party objects needed by various targets.
- cp_
rustc_ πcomponent_ to_ ci_ sysroot - get_
codegen_ backend_ file - Gets the path to a dynamic codegen backend library from its build stamp.
- is_
lto_ stage - We only use LTO for stage 2+, to speed up build time of intermediate stages.
- normalize_
codegen_ backend_ name - Normalize the name of a dynamic codegen backend library.
- run_
cargo - rustc_
cargo - rustc_
cargo_ env - rustc_
llvm_ πenv - Pass down configuration from the LLVM build into the build of rustc_llvm and rustc_codegen_llvm.
- std_
cargo - Configure cargo to compile the standard library, adding appropriate env vars and such.
- std_
crates_ for_ run_ make - Resolves standard library crates for
Std::run_make
for any build kind (like check, doc, build, clippy, etc.). - stream_
cargo - strip_
debug - write_
codegen_ πbackend_ stamp - Write filtered
files
into the passed build stamp and returns it.