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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits