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

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 6 16:46:07 PDT 2016


phosek added inline comments.

================
Comment at: lib/CMakeLists.txt:188
@@ -162,1 +187,3 @@
+    target_link_libraries(cxx_experimental cxx_static)
+  endif()
 
----------------
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.


Repository:
  rL LLVM

https://reviews.llvm.org/D23232





More information about the llvm-commits mailing list