You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-compiletestArea: The compiletest test runnerC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
riscv64 isn't a real LLVM component (only riscv). However, the test never errors; instead it always gets ignored. It seems pretty likely that there are at least a few in-tree tests that never get run because of a typo here.
It should be reasonably easy to keep a list of valid LLVM components and validate against that in compiletest.
I'm imagining this would be a list of components somewhere in compiletest rather than querying LLVM, the set is pretty small and static. The built LLVM can have components turned on or off but it will always be a subset of that list; if the component isn't available on the current LLVM version then we ignore the test, but if the component isn't available at all then it would be better to error.
That might not be accurate if "component" ever refers to something other than an architecture family, but I don't see any indication of that or use in our tests. It seems like it corresponds to the options from LLVM_TARGETS_TO_BUILD, which are listed as AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;LoongArch;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore at https://llvm.org/docs/CMake.html.
Hi. I found a similar attempt to check invalid component names in lint, but it was later reverted in #125949.
From what I understand, based on that previous attempt, the names specified in needs-llvm-components are already validated by CI when COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS is set. I might be mistaken, but how does this issue differ from that previous attempt?
No you're right, this will indeed fail in CI if the component does not exist. But as in, CI will require that all tests with the components that CI LLVM is built with is run.
I suppose one may be able to query llvm-config --components to validate that the component exists, or somehow pull out the targets to build list elsewhere to share.
Oh awesome, I didn't realize this did get checked in CI. It would still be nice to have something for development; could we bless the output from llvm-config to a file when COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS is set and check against that?
A-compiletestArea: The compiletest test runnerC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Activity
jieyouxu commentedon Mar 7, 2025
Doesn't the list of valid llvm components change w/ the underlying llvm? Like you can build a local llvm that do not have what CI llvm has
tgross35 commentedon Mar 7, 2025
I'm imagining this would be a list of components somewhere in compiletest rather than querying LLVM, the set is pretty small and static. The built LLVM can have components turned on or off but it will always be a subset of that list; if the component isn't available on the current LLVM version then we ignore the test, but if the component isn't available at all then it would be better to error.
That might not be accurate if "component" ever refers to something other than an architecture family, but I don't see any indication of that or use in our tests. It seems like it corresponds to the options from
LLVM_TARGETS_TO_BUILD, which are listed asAArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;LoongArch;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCoreat https://llvm.org/docs/CMake.html.s7tya commentedon Mar 7, 2025
Hi. I found a similar attempt to check invalid component names in lint, but it was later reverted in #125949.
From what I understand, based on that previous attempt, the names specified in
needs-llvm-componentsare already validated by CI whenCOMPILETEST_REQUIRE_ALL_LLVM_COMPONENTSis set. I might be mistaken, but how does this issue differ from that previous attempt?jieyouxu commentedon Mar 7, 2025
No you're right, this will indeed fail in CI if the component does not exist. But as in, CI will require that all tests with the components that CI LLVM is built with is run.
I suppose one may be able to query llvm-config --components to validate that the component exists, or somehow pull out the targets to build list elsewhere to share.
tgross35 commentedon Mar 7, 2025
Oh awesome, I didn't realize this did get checked in CI. It would still be nice to have something for development; could we bless the output from llvm-config to a file when
COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTSis set and check against that?jieyouxu commentedon Mar 7, 2025
Possibly? It'd somehow need to be not tracked to prevent you from accidentally checking that in.