Module config

Source
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.
ChangeIdWrapper πŸ”’
Since we use #[serde(deny_unknown_fields)] on TomlConfig, 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.
OptimizeVisitor πŸ”’
Rust πŸ”’
TOML representation of how the Rust build is configured.
Target
Per-target configuration stored in the global configuration structure.
TargetSelection
TargetSelectionList
Newtype over Vec<TargetSelection> so we can implement custom parsing logic
TomlConfig πŸ”’
Structure of the config.toml file that configuration is read from.
TomlTarget πŸ”’
TOML representation of how each build target is configured.

Enums§

DebuginfoLevel
DryRun
GccCiMode
Determines how will GCC be provided.
LldMode
LLD in bootstrap works like this:
LlvmLibunwind
ReplaceOpt πŸ”’
Describes how to handle conflicts in merging two TomlConfig
RustOptimize
RustcLto
LTO mode used for compiling rustc itself.
RustfmtState
SplitDebuginfo
StringOrBool
StringOrInt πŸ”’

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 the Llvm instance to make sure every Llvm 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 every Rust field is covered and not missing.
format_optimize_error_msg πŸ”’
set πŸ”’
target_selection_list
threads_from_config πŸ”’