Skip to content

Commit

Permalink
[clang-tidy] Fix linking tests to LLVMTestingSupport
Browse files Browse the repository at this point in the history
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

Differential Revision: https://reviews.llvm.org/D95653

(cherry picked from commit 632545e)
  • Loading branch information
mgorny authored and tstellar committed Jan 30, 2021
1 parent 4e20d9c commit 07f8d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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
Expand Down Expand Up @@ -46,4 +45,5 @@ target_link_libraries(ClangTidyTests
clangTidyObjCModule
clangTidyReadabilityModule
clangTidyUtils
LLVMTestingSupport
)

0 comments on commit 07f8d43

Please sign in to comment.