Skip to content

Commit

Permalink
Skip building cranelift for Fuchsia
Browse files Browse the repository at this point in the history
This refactors run.sh to never override an explicit $CODEGEN_BACKENDS if
set in the build.
  • Loading branch information
tmandry committed Jan 26, 2024
1 parent 40f5e68 commit 53bf511
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
8 changes: 5 additions & 3 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 53bf511

Please sign in to comment.