From f0403c853bc93fe1127fef7493a4feff1479191e Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Mon, 12 Sep 2022 13:45:17 +0200 Subject: [PATCH] Fix build of Lex unit test with CLANG_DYLIB If CLANG_LINK_CLANG_DYLIB, clang_target_link_libraries ignores all indivial libraries and only links clang-cpp. As LLVMTestingSupport is separate, pass it via target_link_libraries directly. --- clang/unittests/Lex/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/unittests/Lex/CMakeLists.txt b/clang/unittests/Lex/CMakeLists.txt index 5b498f54fb0a..bed5fd9186f2 100644 --- a/clang/unittests/Lex/CMakeLists.txt +++ b/clang/unittests/Lex/CMakeLists.txt @@ -20,6 +20,9 @@ clang_target_link_libraries(LexTests clangLex clangParse clangSema + ) +target_link_libraries(LexTests + PRIVATE LLVMTestingSupport )