Skip to content

Fix download of GCC from CI on non-nightly channels #140901

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 1 commit into from
May 10, 2025
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/bootstrap/src/core/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,8 @@ download-rustc = false
t!(fs::create_dir_all(&gcc_cache));
}
let base = &self.stage0_metadata.config.artifacts_server;
let filename = format!("gcc-nightly-{}.tar.xz", self.build.triple);
let version = self.artifact_version_part(gcc_sha);
let filename = format!("gcc-{version}-{}.tar.xz", self.build.triple);
Comment on lines -855 to +856
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work fine on stable channels?

match channel.as_str() {
"stable" => version,
"beta" => channel,
"nightly" => channel,
other => unreachable!("{:?} is not recognized as a valid channel", other),
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the exact same code for downloading LLVM and CI rustc, and the GCC dist component should produce the dist artifacts on all channels, so I think it should. But as usually, it's hard to be sure until we try.. 😆

let tarball = gcc_cache.join(&filename);
if !tarball.exists() {
let help_on_error = "ERROR: failed to download gcc from ci
Expand Down
Loading