[PATCH] D95653: [cte] [clang-tidy] Fix linking tests to LLVMTestingSupport

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 17:18:29 PST 2021


mgorny created this revision.
mgorny added reviewers: njames93, aaron.ballman.
Herald added subscribers: usaxena95, kadircet, xazax.hun.
mgorny requested review of this revision.
Herald added a subscriber: ilya-biryukov.

LLVMTestingSupport is not part of libLLVM, and therefore can not
be linked to via LLVM_LINK_COMPONENTS.  Instead, it needs to be
specified explicitly to ensure that it is linked explicitly
even if LLVM_LINK_LLVM_DYLIB is used.  This is consistent with handling
in clangd.

Fixes PR#48931


https://reviews.llvm.org/D95653

Files:
  clang-tools-extra/unittests/clang-tidy/CMakeLists.txt


Index: clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
===================================================================
--- clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
+++ clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
@@ -1,7 +1,6 @@
 set(LLVM_LINK_COMPONENTS
   FrontendOpenMP
   Support
-  TestingSupport
   )
 
 get_filename_component(CLANG_LINT_SOURCE_DIR
@@ -46,4 +45,5 @@
   clangTidyObjCModule
   clangTidyReadabilityModule
   clangTidyUtils
+  LLVMTestingSupport
   )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95653.320010.patch
Type: text/x-patch
Size: 503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210129/ea263943/attachment.bin>


More information about the cfe-commits mailing list