From 4082f9f77567b6b5b61f411d9c08b66853e87a95 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Fri, 16 Aug 2024 21:57:28 +0300 Subject: [PATCH] force `download-rustc=if-unchanged` for x86_64-gnu-tools runner Signed-off-by: onur-ozkan --- src/bootstrap/src/core/builder/tests.rs | 12 ++++++------ src/bootstrap/src/core/config/config.rs | 9 ++++----- .../docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 1 + src/ci/run.sh | 1 + 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 3d2e3daf915..4a96ecf1421 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -241,12 +241,12 @@ fn ci_rustc_if_unchanged_logic() { let compiler_path = build.src.join("compiler"); let library_path = build.src.join("compiler"); - let commit = get_closest_merge_commit( - Some(&builder.config.src), - &builder.config.git_config(), - &[compiler_path.clone(), library_path.clone()], - ) - .unwrap(); + let commit = + get_closest_merge_commit(Some(&builder.config.src), &builder.config.git_config(), &[ + compiler_path.clone(), + library_path.clone(), + ]) + .unwrap(); let has_changes = !helpers::git(Some(&builder.src)) .args(["diff-index", "--quiet", &commit]) diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 76e3343e86f..9f84b492b80 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -2736,11 +2736,10 @@ fn download_ci_rustc_commit( // Look for a version to compare to based on the current commit. // Only commits merged by bors will have CI artifacts. - let commit = get_closest_merge_commit( - Some(&self.src), - &self.git_config(), - &[self.src.join("compiler"), self.src.join("library")], - ) + let commit = get_closest_merge_commit(Some(&self.src), &self.git_config(), &[ + self.src.join("compiler"), + self.src.join("library"), + ]) .unwrap(); if commit.is_empty() { println!("ERROR: could not find commit hash for downloading rustc"); diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index 145f41f21e1..17fc1a57492 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -84,6 +84,7 @@ ENV RUST_CONFIGURE_ARGS \ --enable-new-symbol-mangling ENV HOST_TARGET x86_64-unknown-linux-gnu +ENV FORCE_CI_RUSTC 1 COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ diff --git a/src/ci/run.sh b/src/ci/run.sh index 457f36bdd20..1ce54f9ecb3 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -55,6 +55,7 @@ fi # If runner uses an incompatible option and `FORCE_CI_RUSTC` is not defined, # switch to in-tree rustc. if [ "$FORCE_CI_RUSTC" == "" ]; then + echo "debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured." DISABLE_CI_RUSTC_IF_INCOMPATIBLE=1 fi