llvm wrapper's target feature filtering breaks UI tests, is difficult to debug #114661
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Every attempt to ask LLVM "does the target support this feature?" either succeeds or causes a side effect of writing a message to stderr:
Since the UI tests are very strict about matching exactly the same stderr output across LLVM versions, this means teaching rustc about an LLVM feature that exists in only some versions but not others creates a contradiction: if that error line is expected, the tests will fail against newer versions of LLVM, and if it's absent then the tests can't pass against the older versions. Since rustc runs the filter at target selection time, any UI tests at all for this architecture will fail, regardless of their contents.
What's worse is the developer experience. I ran into it introducing UI tests for riscv targets as part of adding an ABI (see #111891 (comment) ) and since the issue presents as having forgotten to
--bless
some output, I went back and forth a number of times adding and removing the line. It's not at all clear from the failure that an unused feature supported-on-some-but-not-other-LLVMs is the culprit, and because it fails in CI the feedback loop for this condition is terribly long.Some possible resolutions include:
/cc @nikic
The text was updated successfully, but these errors were encountered: