Skip to main contentModule cargo
Source use std::ffi::OsStr; ๐ use std::ffi::OsString; ๐ use std::path::Path; ๐ use std::path::PathBuf; ๐ use std::sync::OnceLock; ๐ use std::env; ๐ use std::env; ๐ use std::fs; ๐ use super::Builder; ๐ use super::Kind; ๐ use crate::core::build_steps::compile::is_lto_stage; ๐ use crate::core::build_steps::llvm::Llvm; ๐ use crate::core::build_steps::test; ๐ use crate::core::build_steps::tool::SourceType; ๐ use crate::core::compiler::Compiler; ๐ use crate::core::config::flags::Color; ๐ use crate::core::config::flags::Subcommand; ๐ use crate::core::config::toml::pgo::PgoConfig; ๐ use crate::core::config::CompressDebuginfo; ๐ use crate::core::config::Config; ๐ use crate::core::config::DryRun; ๐ use crate::core::config::RustcLto; ๐ use crate::core::config::SplitDebuginfo; ๐ use crate::core::config::TargetSelection; ๐ use crate::core::session::CLang; ๐ use crate::core::session::Mode; ๐ use crate::core::session::RemapScheme; ๐ use crate::utils::build_stamp; ๐ use crate::utils::exec::BootstrapCommand; ๐ use crate::utils::exec::command; ๐ use crate::utils::helpers; ๐ use crate::utils::helpers::LldThreads; ๐ use crate::utils::helpers::check_cfg_arg; ๐ use crate::utils::helpers::envify; ๐ use crate::utils::helpers::linker_flags; ๐ use crate::utils::helpers::t; ๐
- Cargo ๐
- HostFlags ๐
- Flags that are passed to the
rustc shim binary. These flags will only be applied when
compiling host code, i.e. when --target is unset. - Rustflags ๐
- Represents flag values in
String form with a \x1f delimiter to pass to the compiler later.
- EXTRA_CHECK_CFGS ๐
- Extra
--check-cfg to add when building the compiler or tools
(Mode restriction, config name, config values (if any))
- apply_pgo ๐
- Applies PGO compile flags to the given Cargo invocation based on the given PGO config.
PGO flags are only applied when compiling a stage2 component.
- cargo_profile_var ๐
- flags_env ๐
- Picks the environment variable and value to pass a set of
Rustflags to cargo. - prepare_shims_dump_dir ๐
- Ensures that the behavior dump directory is properly initialized.