Expand description
Serialized configuration of a build.
This module implements parsing config.toml
configuration files to tweak
how the build runs.
Re-exports§
pub use crate::core::config::flags::Subcommand;
Macros§
- check_
ci_ πllvm - define_
config π
Structs§
- Build π
- TOML representation of various global build decisions.
- Change
IdWrapper π - Since we use
#[serde(deny_unknown_fields)]
onTomlConfig
, we need a wrapper type for the βchange-idβ field to parse it even if other fields are invalid. This ensures that if deserialization fails due to other fields, we can still provide the changelogs to allow developers to potentially find the reason for the failure in the logs.. - Config
- Global configuration for the entire build and/or bootstrap.
- Dist π
- Gcc π
- TOML representation of how the GCC build is configured.
- Install π
- TOML representation of various global install decisions.
- Llvm π
- TOML representation of how the LLVM build is configured.
- Optimize
Visitor π - Rust π
- TOML representation of how the Rust build is configured.
- Target
- Per-target configuration stored in the global configuration structure.
- Target
Selection - Target
Selection List - Newtype over
Vec<TargetSelection>
so we can implement custom parsing logic - Toml
Config π - Structure of the
config.toml
file that configuration is read from. - Toml
Target π - TOML representation of how each build target is configured.
Enums§
- Debuginfo
Level - DryRun
- GccCi
Mode - Determines how will GCC be provided.
- LldMode
- LLD in bootstrap works like this:
- Llvm
Libunwind - Replace
Opt π - Describes how to handle conflicts in merging two
TomlConfig
- Rust
Optimize - Rustc
Lto - LTO mode used for compiling rustc itself.
- Rustfmt
State - Split
Debuginfo - String
OrBool - String
OrInt π
Constants§
- BUILDER_
CONFIG_ πFILENAME - This file is embedded in the overlay directory of the tarball sources. It is useful in scenarios where developers want to see how the tarball sources were generated.
- 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§
- check_
incompatible_ πoptions_ for_ ci_ llvm - Compares the current
Llvm
options against those in the CI LLVM builder and detects any incompatible options. It does this by destructuring theLlvm
instance to make sure everyLlvm
field is covered and not missing. - check_
incompatible_ πoptions_ for_ ci_ rustc - Compares the current Rust options against those in the CI rustc builder and detects any incompatible options.
It does this by destructuring the
Rust
instance to make sure everyRust
field is covered and not missing. - format_
optimize_ πerror_ msg - set π
- target_
selection_ list - threads_
from_ πconfig