Module config

Source
Expand description

Entry point for the config module.

This module defines two macros:

  • define_config!: A declarative macro used instead of #[derive(Deserialize)] to reduce compile time and binary size, especially for the bootstrap binary.

  • check_ci_llvm!: A compile-time assertion macro that ensures certain settings are not enabled when download-ci-llvm is active.

A declarative macro is used here in place of a procedural derive macro to minimize the compile time of the bootstrap process.

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§

pub use target_selection::TargetSelection;
pub use toml::BUILDER_CONFIG_FILENAME;
pub use toml::change_id::ChangeId;
pub use toml::rust::LldMode;
pub use toml::target::Target;
pub use config::*;

Modules§

config 🔒
This module defines the central Config struct, which aggregates all components of the bootstrap configuration into a single unit.
flags
Command-line interface of the bootstrap build system.
target_selection
toml
This module defines the structures that directly mirror the bootstrap.toml file’s format. These types are used for serde deserialization.

Enums§

DebuginfoLevel
DryRun
GccCiMode
Determines how will GCC be provided.
LlvmLibunwind
ReplaceOpt
Describes how to handle conflicts in merging two TomlConfig
RustcLto
LTO mode used for compiling rustc itself.
SplitDebuginfo
StringOrBool
StringOrInt

Traits§

Merge 🔒

Functions§

set
threads_from_config