compiletest: Support ignoring tests requiring missing LLVM components #75064
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a more principled solution to the problem described in #66084.
Builds of LLVM backends take a lot of time and disk space.
So it usually makes sense to build rustc with
unless you are working on some target-specific tasks.
A few tests, however, require non-x86 backends to be built.
A new test directive
// needs-llvm-components: component1 component2 component3
makes such tests to be automatically ignored if one of the listed components is missing in the provided LLVM (this is determined throughllvm-config --components
).As a result, the test suite now fully passes with LLVM built only with the x86 backend. The component list in this case is
(With the default target list it's much larger.)
#66084 is also reverted now.
r? @Mark-Simulacrum