[PATCH] D82694: [clang-shlib] Don't link with static clang libraries
Tom Stellard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 10 14:28:52 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1d68a780b34e: [clang-shlib] Don't link with static clang libraries (authored by tstellar).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82694/new/
https://reviews.llvm.org/D82694
Files:
clang/tools/clang-shlib/CMakeLists.txt
Index: clang/tools/clang-shlib/CMakeLists.txt
===================================================================
--- clang/tools/clang-shlib/CMakeLists.txt
+++ clang/tools/clang-shlib/CMakeLists.txt
@@ -13,7 +13,12 @@
else()
list(APPEND _OBJECTS $<TARGET_OBJECTS:obj.${lib}>)
endif()
- list(APPEND _DEPS $<TARGET_PROPERTY:${lib},INTERFACE_LINK_LIBRARIES>)
+ if (BUILD_SHARED_LIBS)
+ # If we are building static libraries, then we don't need to add the static
+ # libraries as a depedency, because we are already linking against the
+ # individual object files.
+ list(APPEND _DEPS $<TARGET_PROPERTY:${lib},INTERFACE_LINK_LIBRARIES>)
+ endif()
# clang libraries are redundant since we are linking all the individual
# object files into libclang-cpp.so, so filter them out from _DEPS.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82694.277147.patch
Type: text/x-patch
Size: 818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200710/ad703d5a/attachment.bin>
More information about the cfe-commits
mailing list