[PATCH] D107231: [clang-repl] Fix building with win32 dylibs
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 31 13:05:38 PDT 2021
mstorsjo created this revision.
mstorsjo added reviewers: v.g.vassilev, teemperor.
Herald added a subscriber: mgorny.
mstorsjo requested review of this revision.
Herald added a project: clang.
Use `clang_target_link_libraries` to avoid duplicate libraries when
the same symbol is provided both by a static library and a larger
dylib, fixing linking with win32 dylibs. This fixes errors like
these:
ld.lld: error: duplicate symbol: llvm::createStringError(std::__1::error_code, char const*)
>>> defined at libLLVMSupport.a(Error.cpp.obj)
>>> defined at libLLVM-14git.dll
This matches how other clang tools declare their dependencies.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107231
Files:
clang/tools/clang-repl/CMakeLists.txt
Index: clang/tools/clang-repl/CMakeLists.txt
===================================================================
--- clang/tools/clang-repl/CMakeLists.txt
+++ clang/tools/clang-repl/CMakeLists.txt
@@ -10,7 +10,7 @@
ClangRepl.cpp
)
-target_link_libraries(clang-repl PUBLIC
+clang_target_link_libraries(clang-repl PUBLIC
clangBasic
clangInterpreter
clangTooling
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107231.363317.patch
Type: text/x-patch
Size: 377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210731/94bb9ae7/attachment.bin>
More information about the cfe-commits
mailing list