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