about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-08-05 15:04:39 +0300
committeronur-ozkan <work@onurozkan.dev>2024-10-08 18:25:35 +0300
commit8a5f418f147204ca3803b986db36d4867cc1cf20 (patch)
tree06287bc258a475052bc49688237fc25366ed8925
parentb0b4f4a1f3bbad98abc08c4ea9dd447d39890b74 (diff)
downloadrust-8a5f418f147204ca3803b986db36d4867cc1cf20.tar.gz
rust-8a5f418f147204ca3803b986db36d4867cc1cf20.zip
handle CI rustc incompatible runners
Signed-off-by: onur-ozkan <work@onurozkan.dev>
-rwxr-xr-xsrc/ci/docker/run.sh1
-rwxr-xr-xsrc/ci/run.sh5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index fad4b5af095..28487bce482 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -343,6 +343,7 @@ docker \
   --env PR_CI_JOB \
   --env OBJDIR_ON_HOST="$objdir" \
   --env CODEGEN_BACKENDS \
+  --env DISABLE_CI_RUSTC_IF_INCOMPATIBLE="$DISABLE_CI_RUSTC_IF_INCOMPATIBLE" \
   --init \
   --rm \
   rust-ci \
diff --git a/src/ci/run.sh b/src/ci/run.sh
index c33a376c2d6..8a8d26f8302 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -52,6 +52,11 @@ if [ "$CI" != "" ]; then
     RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set change-id=99999999"
 fi
 
+# If runner uses an incompatible option and `FORCE_CI_RUSTC` is not defined, switch to in-tree rustc.
+if [ "$FORCE_CI_RUSTC" == "" ]; then
+    DISABLE_CI_RUSTC_IF_INCOMPATIBLE=1
+fi
+
 if ! isCI || isCiBranch auto || isCiBranch beta || isCiBranch try || isCiBranch try-perf || \
   isCiBranch automation/bors/try; then
     RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests"