Skip to content

Commit 9340ee4

Browse files
committed
Ensure that all LLVM components requested by tests are available on CI
1 parent 26373fb commit 9340ee4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/ci/run.sh

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ if [ "$RUST_RELEASE_CHANNEL" = "nightly" ] || [ "$DIST_REQUIRE_ALL_TOOLS" = "" ]
104104
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-missing-tools"
105105
fi
106106

107+
export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1
108+
107109
# Print the date from the local machine and the date from an external source to
108110
# check for clock drifts. An HTTP URL is used instead of HTTPS since on Azure
109111
# Pipelines it happened that the certificates were marked as expired.

src/tools/compiletest/src/header.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,13 @@ impl EarlyProps {
208208
config.parse_name_value_directive(line, "needs-llvm-components")
209209
{
210210
let components: HashSet<_> = config.llvm_components.split_whitespace().collect();
211-
if !needed_components
211+
if let Some(missing_component) = needed_components
212212
.split_whitespace()
213-
.all(|needed_component| components.contains(needed_component))
213+
.find(|needed_component| !components.contains(needed_component))
214214
{
215+
if env::var_os("COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS").is_some() {
216+
panic!("missing LLVM component: {}", missing_component);
217+
}
215218
return true;
216219
}
217220
}

0 commit comments

Comments
 (0)