[clang] f0403c8 - Fix build of Lex unit test with CLANG_DYLIB
Jonas Hahnfeld via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 04:50:13 PDT 2022
Author: Jonas Hahnfeld
Date: 2022-09-12T13:49:57+02:00
New Revision: f0403c853bc93fe1127fef7493a4feff1479191e
URL: https://github.com/llvm/llvm-project/commit/f0403c853bc93fe1127fef7493a4feff1479191e
DIFF: https://github.com/llvm/llvm-project/commit/f0403c853bc93fe1127fef7493a4feff1479191e.diff
LOG: 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.
Added:
Modified:
clang/unittests/Lex/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/unittests/Lex/CMakeLists.txt b/clang/unittests/Lex/CMakeLists.txt
index 5b498f54fb0af..bed5fd9186f22 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
)
More information about the cfe-commits
mailing list