Expand description
Entry point for the config module.
Additionally, this module defines common types, enums, and helper functions used across
various TOML configuration sections in bootstrap.toml.
It provides shared definitions for:
- Data types deserialized from TOML.
- Utility enums for specific configuration options.
- Helper functions for managing configuration values.
Re-exportsΒ§
use std::collections::HashSet;πuse std::fmt::Display;πuse std::path::PathBuf;πuse std::str::FromStr;πuse serde::de::Unexpected;πuse serde::Deserialize;πuse serde::Deserializer;πuse serde_derive::Deserialize;πpub use target_selection::TargetSelection;pub use toml::BUILDER_CONFIG_FILENAME;pub use toml::change_id::ChangeId;pub use toml::rust::BootstrapOverrideLld;pub use toml::target::Target;use crate::utils::helpers;π
ModulesΒ§
- config π
- This module defines the central
Configstruct, which aggregates all components of the bootstrap configuration into a single unit. - flags
- Command-line interface of the bootstrap build system.
- macros π
- This module defines two macros:
- target_
selection - toml
- This module defines the structures that directly mirror the
bootstrap.tomlfileβs format. These types are used forserdedeserialization.
StructsΒ§
- Config π
- Global configuration for the entire build and/or bootstrap.
- Llvm
PgoConfig π
EnumsΒ§
- Allocator
- Compiler
Builtins - Compress
Debuginfo - Debugger
Path - Debuginfo
Level - DryRun
- GccCi
Mode - Determines how will GCC be provided.
- Llvm
CiMode - Determines how will LLVM be provided.
- Llvm
Libunwind - Llvm
PgoGeneration πMode - Replace
Opt - Describes how to handle conflicts in merging two
TomlConfig - Rustc
Lto - LTO mode used for compiling rustc itself.
- Split
Debuginfo - String
OrBool - String
OrInt - Would
BeValid πFor
ConstantsΒ§
- RUSTC_
IF_ πUNCHANGED_ ALLOWED_ PATHS - Each path in this list is considered βallowedβ in the
download-rustc="if-unchanged"logic. This means they can be modified and changes to these paths should never trigger a compiler build when βif-unchangedβ is set.
TraitsΒ§
- Merge π
FunctionsΒ§
- bad_
config π - check_
external_ πbinary_ version - Check that the version of an externally provided rustc/cargo is either the same or 1 version older than the in-tree version.
- check_
path_ πmodifications_ - compute_
src_ πdirectory_ via_ git - download_
ci_ πrustc_ commit - find_
correct_ πsection_ for_ field - git_
config π - git_
info π - has_
changes_ πfrom_ upstream - join_
oxford_ πcomma - load_
toml_ πconfig - Loads bootstrap TOML config and returns the config together with a path from where
it was loaded.
srcis the source root directory, andconfig_pathis an optionally provided path to the config. - parse_
download_ πci_ llvm - postprocess_
toml π - print_
rustc_ πmodifications - read_
file_ πby_ commit - Returns the content of the given file at a specific commit.
- reconcile_
jemalloc π - Reconciles the deprecated
jemallocboolean option with the newallocatoroption. - submodules_ π
- threads_
from_ config - update_
submodule π