Skip to content

Commit 7e8611b

Browse files
committed
Allow older LLVM versions to have missing components
This check was introduced by #77280 to ensure that all tests that are filtered by LLVM component are actually tested in CI. However this causes issues for new targets (e.g. #101069) where support is only available on the latest LLVM version. This PR restricts the tests to only CI jobs that use the latest LLVM version.
1 parent 932c173 commit 7e8611b

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

src/ci/docker/host-x86_64/x86_64-gnu-llvm-14-stage1/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ RUN sh /scripts/sccache.sh
3232
# LLVM, rather than the typical src/llvm-project LLVM.
3333
ENV NO_DOWNLOAD_CI_LLVM 1
3434

35+
# This is not the latest LLVM version, so some components required by tests may
36+
# be missing.
37+
ENV IS_NOT_LATEST_LLVM 1
38+
3539
# Using llvm-link-shared due to libffi issues -- see #34486
3640
ENV RUST_CONFIGURE_ARGS \
3741
--build=x86_64-unknown-linux-gnu \

src/ci/docker/host-x86_64/x86_64-gnu-llvm-14/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ RUN sh /scripts/sccache.sh
3838
# LLVM, rather than the typical src/llvm-project LLVM.
3939
ENV NO_DOWNLOAD_CI_LLVM 1
4040

41+
# This is not the latest LLVM version, so some components required by tests may
42+
# be missing.
43+
ENV IS_NOT_LATEST_LLVM 1
44+
4145
# Using llvm-link-shared due to libffi issues -- see #34486
4246
ENV RUST_CONFIGURE_ARGS \
4347
--build=x86_64-unknown-linux-gnu \

src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ RUN sh /scripts/sccache.sh
4040
# LLVM, rather than the typical src/llvm-project LLVM.
4141
ENV NO_DOWNLOAD_CI_LLVM 1
4242

43+
# This is not the latest LLVM version, so some components required by tests may
44+
# be missing.
45+
ENV IS_NOT_LATEST_LLVM 1
46+
4347
# Using llvm-link-shared due to libffi issues -- see #34486
4448
ENV RUST_CONFIGURE_ARGS \
4549
--build=x86_64-unknown-linux-gnu \

src/ci/run.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ if [ "$RUST_RELEASE_CHANNEL" = "nightly" ] || [ "$DIST_REQUIRE_ALL_TOOLS" = "" ]
138138
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-missing-tools"
139139
fi
140140

141-
export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1
141+
# Unless we're using an older version of LLVM, check that all LLVM components
142+
# used by tests are available.
143+
if [ "$IS_NOT_LATEST_LLVM" = "" ]; then
144+
export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1
145+
fi
142146

143147
# Print the date from the local machine and the date from an external source to
144148
# check for clock drifts. An HTTP URL is used instead of HTTPS since on Azure

0 commit comments

Comments
 (0)