about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@google.com>2023-12-28 16:44:49 -0800
committerTyler Mandry <tmandry@google.com>2024-01-26 13:09:21 -0800
commit53bf511af2b9b54702943eb4fe6e4f17d9fc96c6 (patch)
treed99faad66490b9e94a99a1526288676676c91150
parent40f5e6899d00484f05a3f1b227180a69a43bea0f (diff)
downloadrust-53bf511af2b9b54702943eb4fe6e4f17d9fc96c6.tar.gz
rust-53bf511af2b9b54702943eb4fe6e4f17d9fc96c6.zip
Skip building cranelift for Fuchsia
This refactors run.sh to never override an explicit $CODEGEN_BACKENDS if
set in the build.
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile3
-rwxr-xr-xsrc/ci/run.sh8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile
index ba65ba9bed4..3132f9e0098 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile
@@ -51,6 +51,9 @@ RUN sh /scripts/sccache.sh
 ENV RUST_INSTALL_DIR /checkout/obj/install
 RUN mkdir -p $RUST_INSTALL_DIR/etc
 
+# Fuchsia only supports LLVM.
+ENV CODEGEN_BACKENDS llvm
+
 ENV RUST_CONFIGURE_ARGS \
   --prefix=$RUST_INSTALL_DIR \
   --sysconfdir=etc \
diff --git a/src/ci/run.sh b/src/ci/run.sh
index 420545172e6..1cdcffc1a75 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -119,7 +119,8 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
     RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"
   fi
 
-  RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=${CODEGEN_BACKENDS:-llvm}"
+  CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm}"
+  RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS"
 else
   # We almost always want debug assertions enabled, but sometimes this takes too
   # long for too little benefit, so we just turn them off.
@@ -144,11 +145,12 @@ else
   # tests as it will fail them.
   if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then
     # Test the Cranelift and GCC backends in CI. Bootstrap knows which targets to run tests on.
-    RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=llvm,cranelift,gcc"
+    CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm,cranelift,gcc}"
   else
     # Test the Cranelift backend in CI. Bootstrap knows which targets to run tests on.
-    RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=llvm,cranelift"
+    CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm,cranelift}"
   fi
+  RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS"
 
   # We enable this for non-dist builders, since those aren't trying to produce
   # fresh binaries. We currently don't entirely support distributing a fresh