Skip to content

Add support for downloading GCC from CI #138051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add gcc bootstrap config section
  • Loading branch information
Kobzol committed Mar 10, 2025
commit 009aba0aa3c3e97df5d27dbb722363888c972534
5 changes: 5 additions & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@
# Custom CMake defines to set when building LLVM.
#build-config = {}

# =============================================================================
# Tweaking how GCC is compiled
# =============================================================================
[gcc]

# =============================================================================
# General build configuration options
# =============================================================================
Expand Down
9 changes: 8 additions & 1 deletion src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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) {
Expand All @@ -729,6 +730,7 @@ impl Merge for TomlConfig {
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);

Expand Down Expand Up @@ -995,6 +997,11 @@ define_config! {
}
}

define_config! {
/// TOML representation of how the GCC build is configured.
struct Gcc {}
}

define_config! {
struct Dist {
sign_folder: Option<String> = "sign-folder",
Expand Down