[PATCH] D23232: [libcxx] Allow building both shared and static library

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 7 22:14:18 PDT 2016


compnerd accepted this revision.
This revision is now accepted and ready to land.

================
Comment at: lib/CMakeLists.txt:188
@@ -162,1 +187,3 @@
+    target_link_libraries(cxx_experimental cxx_static)
+  endif()
 
----------------
phosek wrote:
> compnerd wrote:
> > Im not sure I understand this.  Couldn't you build both static and shared versions, and therefore, need both branches?
> These are just link dependencies for `libc++experimental.a`, `libc++.a` and libc++.so` will get build in any case (see the `cxx` meta-target). Using both branches here imply `lib/libc++.a -lc++` as link dependency which is most certainly incorrect. In fact, it seems that CMake ignores link dependencies for static libraries (which is a correct behavior) so this entire block can be safely removed.
Ah, missed the explicit static on the `cxx_experimental`.


Repository:
  rL LLVM

https://reviews.llvm.org/D23232





More information about the llvm-commits mailing list