Open rorth opened 11 months ago
Interesting. Can you please provide full cmake command? I recently, about month ago, switched our bots from DLLVM_ENABLE_PROJECTS to DLLVM_ENABLE_RUNTIMES and compared full verbose output. There were small lld related difference, which I fixed, but nothing big.
I just saw it when looking at a LLVM 17 release build with reltest.sh
, which always does a runtimes build. When looking for Builtins-x86_64-linux :: divtc3_test.c
, I came up blank.
The main
builds I'm referring to above were 2-stage builds. The exact invocations are:
cmake -G Ninja -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS= -DCMAKE_BUILD_TYPE=Release '-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;polly;flang;compiler-rt' '-DLLVM_LIT_ARGS=-v -j 64' -DLLVM_PARALLEL_COMPILE_JOBS=64 -DLLVM_PARALLEL_LINK_JOBS=32 -DLLVM_ENABLE_ASSERTIONS=ON -DCLANG_ENABLE_BOOTSTRAP=On '-DCLANG_BOOTSTRAP_PASSTHROUGH=;BUILD_SHARED_LIBS;CLANG_DEFAULT_LINKER;CLANG_ENABLE_GLD;CMAKE_BUILD_TYPE;CMAKE_VERBOSE_MAKEFILE;COMPILER_RT_DEBUG;ENABLE_X86_RELAX_RELOCATIONS;LIBXML2_LIBRARY;LLVM_ENABLE_ASSERTIONS;LLVM_ENABLE_LLD;LLVM_ENABLE_PER_TARGET_RUNTIME_DIR;LLVM_ENABLE_PROJECTS;LLVM_ENABLE_RUNTIMES;LLVM_HOST_TRIPLE;LLVM_LIT_ARGS;LLVM_PARALLEL_COMPILE_JOBS;LLVM_PARALLEL_LINK_JOBS;LLVM_TARGETS_TO_BUILD;' -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=Off /vol/llvm/src/llvm-project/local/llvm
cmake -G Ninja -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS= -DCMAKE_BUILD_TYPE=Release '-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;polly;flang' '-DLLVM_LIT_ARGS=-v -j 64' -DLLVM_PARALLEL_COMPILE_JOBS=64 -DLLVM_PARALLEL_LINK_JOBS=32 -DLLVM_ENABLE_ASSERTIONS=ON -DCLANG_ENABLE_BOOTSTRAP=On '-DCLANG_BOOTSTRAP_PASSTHROUGH=;BUILD_SHARED_LIBS;CLANG_DEFAULT_LINKER;CLANG_ENABLE_GLD;CMAKE_BUILD_TYPE;CMAKE_VERBOSE_MAKEFILE;COMPILER_RT_DEBUG;ENABLE_X86_RELAX_RELOCATIONS;LIBXML2_LIBRARY;LLVM_ENABLE_ASSERTIONS;LLVM_ENABLE_LLD;LLVM_ENABLE_PER_TARGET_RUNTIME_DIR;LLVM_ENABLE_PROJECTS;LLVM_ENABLE_RUNTIMES;LLVM_HOST_TRIPLE;LLVM_LIT_ARGS;LLVM_PARALLEL_COMPILE_JOBS;LLVM_PARALLEL_LINK_JOBS;LLVM_TARGETS_TO_BUILD;' -DLLVM_ENABLE_RUNTIMES=compiler-rt /vol/llvm/src/llvm-project/local/llvm
I can reproduce this. DLLVM_ENABLE_RUNTIMES check-all is missing all/most unittests and all builtin tests.
However check-compiler-rt is missing only builtin tests.
On our sanitizer bots we run check-compiler-rt, and builtins are not in the scope of the group, so I probably was not concerned switching to DLLVM_ENABLE_RUNTIMES.
I have managed to reproduce this and I think I understand the issue, I'll try to come up with a solution.
I have confirmed that most of these will be addressed by #72955, the only ones that's not covered by that pull request are builtins tests which need a different solution.
When building main
on sparc64-unknown-linux-gnu
as a runtimes build in preparation for LLVM 18.1.0 rc1, I noticed that the builtins tests are still not run with check-all
. I couldn't even find any target to run them at all.
Unfortunately, the lack of check-builtins
support is still an issue after 9 months. IIUC this is (or isn't) handled in the terrible maze that is llvm/runtimes/CMakeLists.txt
: while the runtimes
support in there does add check-runtimes*
targets, the (sort of) equivalent builtins
support does not.
As has been reported for a long time (probably since the LLVM 14 release cycle when the runtimes build was first made the
reltest.sh
default), building with-DLLVM_ENABLE_RUNTIMES=compiler-rt
(which is the default these days) misses a large number ofcompiler-rt
tests that are run with-DLLVM_ENABLE_PROJECTS=compiler-rt
. The issue came up again in Issue #71971 and has apparently never been noticed during the development of the runtimes build (which doesn't speak particularly highly for the diligence of the testing at that point) and completely ignored despite the release tester reports since, massively reducingcompiler-rt
test coverage and missing all sorts of issues in new patches that would be noticed immedidately otherwise.To provide detail, I've now run two
x86_64-pc-linux-gnu
builds, one projects build and one runtimes build. Here are the differences in overall test results from just that change (which should be a no-op for test results):As one can see, more than 3200 tests are no longer run in a runtimes build. I've then extracted the names of the tests run from both build's
ninja check-all
output. Here are the test categrories that are missing in the runtimes build:In most cases, all tests from a category are missing, while for the
xray
tests about half of the tests changed fromPASS
toUNSUPPORTED
.I then looked for the missing tests: in the case of
builtins
, thelit.*
files that controlled the tests used to live inwhile they are now missing completely: they are neither present in
runtimes-bins
nor inbuiltins-bins
where they should be after splitting the object directories forbuiltins
from the rest ofcompiler-rt
. Without thelit.*
files, it's no wonder thebuiltins
tests aren't run at all.For the other missing tests, the
lit.*
files are present, but I don't yet see why the tests aren't run.