Fix build of Lex unit test with CLANG_DYLIB
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Mon, 12 Sep 2022 11:45:17 +0000 (13:45 +0200)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Mon, 12 Sep 2022 11:49:57 +0000 (13:49 +0200)
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

index 5b498f5..bed5fd9 100644 (file)
@@ -20,6 +20,9 @@ clang_target_link_libraries(LexTests
   clangLex
   clangParse
   clangSema
+  )
 
+target_link_libraries(LexTests
+  PRIVATE
   LLVMTestingSupport
   )