Skip to content

Commit 009aba0

Browse files
committed
Add gcc bootstrap config section
1 parent 53237c8 commit 009aba0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: config.example.toml

+5
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@
163163
# Custom CMake defines to set when building LLVM.
164164
#build-config = {}
165165

166+
# =============================================================================
167+
# Tweaking how GCC is compiled
168+
# =============================================================================
169+
[gcc]
170+
166171
# =============================================================================
167172
# General build configuration options
168173
# =============================================================================

Diff for: src/bootstrap/src/core/config/config.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ pub(crate) struct TomlConfig {
676676
build: Option<Build>,
677677
install: Option<Install>,
678678
llvm: Option<Llvm>,
679+
gcc: Option<Gcc>,
679680
rust: Option<Rust>,
680681
target: Option<HashMap<String, TomlTarget>>,
681682
dist: Option<Dist>,
@@ -710,7 +711,7 @@ trait Merge {
710711
impl Merge for TomlConfig {
711712
fn merge(
712713
&mut self,
713-
TomlConfig { build, install, llvm, rust, dist, target, profile, change_id }: Self,
714+
TomlConfig { build, install, llvm, gcc, rust, dist, target, profile, change_id }: Self,
714715
replace: ReplaceOpt,
715716
) {
716717
fn do_merge<T: Merge>(x: &mut Option<T>, y: Option<T>, replace: ReplaceOpt) {
@@ -729,6 +730,7 @@ impl Merge for TomlConfig {
729730
do_merge(&mut self.build, build, replace);
730731
do_merge(&mut self.install, install, replace);
731732
do_merge(&mut self.llvm, llvm, replace);
733+
do_merge(&mut self.gcc, gcc, replace);
732734
do_merge(&mut self.rust, rust, replace);
733735
do_merge(&mut self.dist, dist, replace);
734736

@@ -995,6 +997,11 @@ define_config! {
995997
}
996998
}
997999

1000+
define_config! {
1001+
/// TOML representation of how the GCC build is configured.
1002+
struct Gcc {}
1003+
}
1004+
9981005
define_config! {
9991006
struct Dist {
10001007
sign_folder: Option<String> = "sign-folder",

0 commit comments

Comments
 (0)