| Issue |
165820
|
| Summary |
Every clang-tools-extra project is a dependency for each test suite.
|
| Labels |
cmake,
clang-tools-extra
|
| Assignees |
|
| Reporter |
evelez7
|
The `build.ninja` file generated from a CMake invocation for `clang-tools-extra` generates the following lines among others for `clang-tools-extra`:
```
#############################################
# Utility command for check-clang-extra-clang-change-namespace
build tools/clang/tools/extra/test/check-clang-extra-clang-change-namespace: phony tools/clang/tools/extra/test/CMakeFiles/check-clang-extra-clang-change-namespace bin/FileCheck bin/clang-apply-replacements bin/clang-change-namespace bin/clang-doc bin/clang-include-fixer bin/clang-move bin/clang-query bin/clang-reorder-fields bin/clang-tidy bin/count bin/find-all-symbols bin/llvm-bcanalyzer bin/modularize bin/not bin/pp-trace bin/split-file lib/CTTestTidyModule.so tools/clang/lib/Headers/clang-resource-headers tools/clang/tools/extra/unittests/ExtraToolsUnitTests
#############################################
# Utility command for check-clang-extra-clang-doc
build tools/clang/tools/extra/test/check-clang-extra-clang-doc: phony tools/clang/tools/extra/test/CMakeFiles/check-clang-extra-clang-doc bin/FileCheck bin/clang-apply-replacements bin/clang-change-namespace bin/clang-doc bin/clang-include-fixer bin/clang-move bin/clang-query bin/clang-reorder-fields bin/clang-tidy bin/count bin/find-all-symbols bin/llvm-bcanalyzer bin/modularize bin/not bin/pp-trace bin/split-file lib/CTTestTidyModule.so tools/clang/lib/Headers/clang-resource-headers tools/clang/tools/extra/unittests/ExtraToolsUnitTests
```
As you can see, they're nearly identical save for the command name. The expected behavior for something like `ninja -C build check-clang-tools-extra-clang-doc` would be to only build `clang-doc` and its tests and to only run `clang-doc` tests. The actual result is that this builds and links every project in `clang-tools-extra`, but only runs the specified project's tests. That's unfortunate because it's time wasted building projects that aren't needed at the time.
I believe it might have something to do with the way that the project executables are added as test dependencies.
https://github.com/llvm/llvm-project/blob/56777e7da2cb30f72a3ddc9861a2fbe3b9adbc6b/clang-tools-extra/test/CMakeLists.txt#L83-L86
where `${CLANG-TOOLS-TEST-DEPS}` is
https://github.com/llvm/llvm-project/blob/9351ad638be5f5cb2f7de300f0518f5ff0923fbf/clang-tools-extra/test/CMakeLists.txt#L31-L54
So it seems like all the executables are dependencies for every suite of tests.
I'm not familiar with how this might affect build bots or folks downstream. How disruptive would it be to divide these dependencies as needed?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs