about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-08-21 01:12:23 -0400
committerGitHub <noreply@github.com>2025-08-21 01:12:23 -0400
commit2032ede072d04301fc0de50d6a3f67522135bf63 (patch)
tree3bdc4d2ee84b0886f0f9f3e57be41e3caf7a9515 /src/bootstrap
parent5ea203adc7f786f2aecf6f5c509a076c25217471 (diff)
parent29f0d8b1427ba1e62a717b5790c9613d827488b4 (diff)
downloadrust-2032ede072d04301fc0de50d6a3f67522135bf63.tar.gz
rust-2032ede072d04301fc0de50d6a3f67522135bf63.zip
Rollup merge of #145654 - Kobzol:gcc-ci-root, r=jieyouxu
Download CI GCC into the correct directory

While doing various experiments with stage3 cross-compilations, I realized that bootstrap is unable to download LLVM from CI for a non-host target, which is quite annoying. Fixing this for LLVM will take some work, but in the meantime we can easily fix this for `download-ci-gcc`, which was implemented in a much more self-contained way.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/gcc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/gcc.rs b/src/bootstrap/src/core/build_steps/gcc.rs
index 2b36b0f2e27..77c9622a9bf 100644
--- a/src/bootstrap/src/core/build_steps/gcc.rs
+++ b/src/bootstrap/src/core/build_steps/gcc.rs
@@ -122,7 +122,7 @@ fn try_download_gcc(builder: &Builder<'_>, target: TargetSelection) -> Option<Pa
     match source {
         PathFreshness::LastModifiedUpstream { upstream } => {
             // Download from upstream CI
-            let root = ci_gcc_root(&builder.config);
+            let root = ci_gcc_root(&builder.config, target);
             let gcc_stamp = BuildStamp::new(&root).with_prefix("gcc").add_stamp(&upstream);
             if !gcc_stamp.is_up_to_date() && !builder.config.dry_run() {
                 builder.config.download_ci_gcc(&upstream, &root);
@@ -286,8 +286,8 @@ pub fn add_cg_gcc_cargo_flags(cargo: &mut Cargo, gcc: &GccOutput) {
 
 /// The absolute path to the downloaded GCC artifacts.
 #[cfg(not(test))]
-fn ci_gcc_root(config: &crate::Config) -> PathBuf {
-    config.out.join(config.host_target).join("ci-gcc")
+fn ci_gcc_root(config: &crate::Config, target: TargetSelection) -> PathBuf {
+    config.out.join(target).join("ci-gcc")
 }
 
 /// Detect whether GCC sources have been modified locally or not.