[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 17 16:35:49 PDT 2025
================
@@ -117,6 +117,7 @@ get_property(LINK_LIBS GLOBAL PROPERTY CLANG_UNITTEST_LINK_LIBS)
get_property(LLVM_COMPONENTS GLOBAL PROPERTY CLANG_UNITTEST_LLVM_COMPONENTS)
add_distinct_clang_unittest(AllClangUnitTests
${SRCS}
+ AllClangUnitTests.cpp
----------------
rnk wrote:
I spot checked two other unit tests that have custom mains, and they don't do anything special:
1. llvm-cfi-verify [main](https://github.com/llvm/llvm-project/blob/main/llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp#L1096) , [cmake](https://github.com/llvm/llvm-project/blob/main/llvm/unittests/tools/llvm-cfi-verify/CMakeLists.txt#L14)
2. LiveIntervalTest [main](https://github.com/llvm/llvm-project/blob/main/llvm/unittests/MI/LiveIntervalTest.cpp#L933), [cmake](https://github.com/llvm/llvm-project/blob/main/llvm/unittests/MI/CMakeLists.txt#L13)
I think archive semantics are pretty portable between platforms, so I think this just works. The sources used to build the unit test executable override the main provided by the gtest library.
https://github.com/llvm/llvm-project/pull/144428
More information about the cfe-commits
mailing list