Module compile

Source
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
CargoTarget
CodegenBackend
Rustc
RustcLink 🔒
RustcLink copies all of the rlibs from the rustc build into the previous stage’s sysroot. This is necessary for tools using rustc_private, where the previous compiler will build a tool against the next compiler. To build a tool against a compiler, the rlibs of that compiler that it links against must be in the sysroot of the compiler that’s doing the compiling.
StartupObjects
Std
StdLink 🔒
Sysroot

Enums§

CargoMessage

Constants§

CODEGEN_BACKEND_PREFIX 🔒

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 building library/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 🔒
is_codegen_cfg_needed 🔒
is_lto_stage
We only use LTO for stage 2+, to speed up build time of intermediate stages.
needs_codegen_config 🔒
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, build, clippy, etc.).
stream_cargo
strip_debug