Skip to main content

Module cargo

Module cargo 

Source

Re-exportsยง

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; ๐Ÿ”’

Structsยง

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.

Constantsยง

EXTRA_CHECK_CFGS ๐Ÿ”’
Extra --check-cfg to add when building the compiler or tools (Mode restriction, config name, config values (if any))

Functionsยง

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.