Add gcc bootstrap config section

This commit is contained in:
Jakub Beránek
2025-03-05 10:16:22 +01:00
parent 53237c8656
commit 009aba0aa3
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -163,6 +163,11 @@
# Custom CMake defines to set when building LLVM.
#build-config = {}
# =============================================================================
# Tweaking how GCC is compiled
# =============================================================================
[gcc]
# =============================================================================
# General build configuration options
# =============================================================================
+8 -1
View File
@@ -676,6 +676,7 @@ pub(crate) struct TomlConfig {
build: Option<Build>,
install: Option<Install>,
llvm: Option<Llvm>,
gcc: Option<Gcc>,
rust: Option<Rust>,
target: Option<HashMap<String, TomlTarget>>,
dist: Option<Dist>,
@@ -710,7 +711,7 @@ trait Merge {
impl Merge for TomlConfig {
fn merge(
&mut self,
TomlConfig { build, install, llvm, rust, dist, target, profile, change_id }: Self,
TomlConfig { build, install, llvm, gcc, rust, dist, target, profile, change_id }: Self,
replace: ReplaceOpt,
) {
fn do_merge<T: Merge>(x: &mut Option<T>, y: Option<T>, replace: ReplaceOpt) {
@@ -729,6 +730,7 @@ fn do_merge<T: Merge>(x: &mut Option<T>, y: Option<T>, replace: ReplaceOpt) {
do_merge(&mut self.build, build, replace);
do_merge(&mut self.install, install, replace);
do_merge(&mut self.llvm, llvm, replace);
do_merge(&mut self.gcc, gcc, replace);
do_merge(&mut self.rust, rust, replace);
do_merge(&mut self.dist, dist, replace);
@@ -995,6 +997,11 @@ struct Llvm {
}
}
define_config! {
/// TOML representation of how the GCC build is configured.
struct Gcc {}
}
define_config! {
struct Dist {
sign_folder: Option<String> = "sign-folder",