[clang] [unitttests] Fix linking Basic test to LLVMTestingSupport
authorMichał Górny <mgorny@moritz.systems>
Sat, 11 Dec 2021 17:12:24 +0000 (18:12 +0100)
committerMichał Górny <mgorny@moritz.systems>
Mon, 13 Dec 2021 22:00:31 +0000 (23:00 +0100)
commitfd0b00b5c60dcee1ac60e6121571e251fb242e63
treeb85ab2219d3006fc4e42da9150c271bd3ac2b237
parent0aea49a7308322e6987c7b45e4e0d7ab15609e78
[clang] [unitttests] Fix linking Basic test to LLVMTestingSupport

Link BasicTests via explicit target_link_libraries() rather than
clang_target_link_libraries() in order to fix linking when building
clang against libclang-cpp.  The latter requires all listed libraries
to be part of libclang-cpp and omits them if libclang-cpp is used.
However, LLVMTestingSupport is not part of libclang-cpp, so omitting it
causes undefined symbols.  Link to the library explicitly to follow suit
with the 7 other unittest programs.

Differential Revision: https://reviews.llvm.org/D115580
clang/unittests/Basic/CMakeLists.txt