[PATCH] D115580: [clang] [unitttests] Fix linking Basic test to LLVMTestingSupport
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 11 09:19:53 PST 2021
mgorny created this revision.
mgorny added a reviewer: dexonsmith.
mgorny requested review of this revision.
Link BasicTests via explicit target_link_libraries() rather than
clang_target_link_libraries() in order to fix linking when building
clang against libclang. The latter requires all listed libraries
to be part of libclang and omits them if libclang is used. However,
LLVMTestingSupport is not part of libclang, so omitting it causes
undefined symbols. Link to the library explicitly to follow suit
with the 7 other unittest programs.
https://reviews.llvm.org/D115580
Files:
clang/unittests/Basic/CMakeLists.txt
Index: clang/unittests/Basic/CMakeLists.txt
===================================================================
--- clang/unittests/Basic/CMakeLists.txt
+++ clang/unittests/Basic/CMakeLists.txt
@@ -18,5 +18,9 @@
clangAST
clangBasic
clangLex
- LLVMTestingSupport
)
+
+target_link_libraries(BasicTests
+ PRIVATE
+ LLVMTestingSupport
+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115580.393681.patch
Type: text/x-patch
Size: 349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211211/d9795975/attachment.bin>
More information about the cfe-commits
mailing list