ci: Consolidate $IS_NOT_LATEST_LLVM into $EXTERNAL_LLVM

We want to only demand that we check for all components we expect
if we actually built the components we expect, which means
we built the LLVM. Otherwise, it isn't worth checking.
This commit is contained in:
Jubilee Young 2024-05-29 10:32:41 -07:00
parent ce092d46e3
commit 60c30f57c1
2 changed files with 2 additions and 10 deletions

View File

@ -45,10 +45,6 @@ RUN sh /scripts/sccache.sh
ENV NO_DOWNLOAD_CI_LLVM 1
ENV EXTERNAL_LLVM 1
# This is not the latest LLVM version, so some components required by tests may
# be missing.
ENV IS_NOT_LATEST_LLVM 1
# Using llvm-link-shared due to libffi issues -- see #34486
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \

View File

@ -89,6 +89,8 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --dist-compression-formats=xz"
# (to avoid spending a lot of time cloning llvm)
if [ "$EXTERNAL_LLVM" = "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.optimized-compiler-builtins"
# Likewise, only demand we test all LLVM components if we know we built LLVM with them
export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1
elif [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
echo "error: dist builds should always use optimized compiler-rt!" >&2
exit 1
@ -169,12 +171,6 @@ else
fi
fi
# Unless we're using an older version of LLVM, check that all LLVM components
# used by tests are available.
if [ "$IS_NOT_LATEST_LLVM" = "" ]; then
export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1
fi
if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then
# If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling`
# argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable.