Skip to main content

Module config

Module config 

Source
Expand description

This module defines the central Config struct, which aggregates all components of the bootstrap configuration into a single unit.

It serves as the primary public interface for accessing the bootstrap configuration. The module coordinates the overall configuration parsing process using logic from parsing.rs and provides top-level methods such as Config::parse() for initialization, as well as utility methods for querying and manipulating the complete configuration state.

Additionally, this module contains the core logic for parsing, validating, and inferring the final Config from various raw inputs.

It manages the process of reading command-line arguments, environment variables, and the bootstrap.toml fileโ€”merging them, applying defaults, and performing cross-component validation. The main parse_inner function and its supporting helpers reside here, transforming raw Toml data into the structured Config type.

Structsยง

Config ๐Ÿ”’
Global configuration for the entire build and/or bootstrap.
LlvmPgoConfig

Enumsยง

LlvmPgoGenerationMode
WouldBeValidFor ๐Ÿ”’

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.

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. src is the source root directory, and config_path is 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 jemalloc boolean option with the new allocator option.
submodules_
update_submodule ๐Ÿ”’