[clang-tidy] Fix linking tests to LLVMTestingSupport
authorMichał Górny <mgorny@moritz.systems>
Fri, 29 Jan 2021 01:14:47 +0000 (02:14 +0100)
committerMichał Górny <mgorny@moritz.systems>
Fri, 29 Jan 2021 20:54:09 +0000 (21:54 +0100)
commit632545e8ce846ccaeca8df15a3dc5e36d01a1275
tree46590cc82aa3278a8181091c0dd5cd0f7b2cfe1a
parent8d7cbcf582c5c7bc08a9de7f31fed63bf2687127
[clang-tidy] Fix linking tests to LLVMTestingSupport

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
clang-tools-extra/unittests/clang-tidy/CMakeLists.txt