Skip to content

Commit c1e778d

Browse files
committed
Add gcc bootstrap config section
1 parent 0953073 commit c1e778d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

config.example.toml

Lines changed: 5 additions & 0 deletions
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
# =============================================================================

src/bootstrap/src/core/config/config.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ pub(crate) struct TomlConfig {
670670
build: Option<Build>,
671671
install: Option<Install>,
672672
llvm: Option<Llvm>,
673+
gcc: Option<Gcc>,
673674
rust: Option<Rust>,
674675
target: Option<HashMap<String, TomlTarget>>,
675676
dist: Option<Dist>,
@@ -704,7 +705,7 @@ trait Merge {
704705
impl Merge for TomlConfig {
705706
fn merge(
706707
&mut self,
707-
TomlConfig { build, install, llvm, rust, dist, target, profile, change_id }: Self,
708+
TomlConfig { build, install, llvm, gcc, rust, dist, target, profile, change_id }: Self,
708709
replace: ReplaceOpt,
709710
) {
710711
fn do_merge<T: Merge>(x: &mut Option<T>, y: Option<T>, replace: ReplaceOpt) {
@@ -723,6 +724,7 @@ impl Merge for TomlConfig {
723724
do_merge(&mut self.build, build, replace);
724725
do_merge(&mut self.install, install, replace);
725726
do_merge(&mut self.llvm, llvm, replace);
727+
do_merge(&mut self.gcc, gcc, replace);
726728
do_merge(&mut self.rust, rust, replace);
727729
do_merge(&mut self.dist, dist, replace);
728730

@@ -988,6 +990,11 @@ define_config! {
988990
}
989991
}
990992

993+
define_config! {
994+
/// TOML representation of how the GCC build is configured.
995+
struct Gcc {}
996+
}
997+
991998
define_config! {
992999
struct Dist {
9931000
sign_folder: Option<String> = "sign-folder",

0 commit comments

Comments
 (0)