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.


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

Reply via email to