[PATCH] D56026: [libcxxabi] Support building hermetic static library

Petr Hosek via Phabricator reviews at reviews.llvm.org
Sun Jan 13 19:00:15 PST 2019


phosek added inline comments.


================
Comment at: libcxxabi/src/CMakeLists.txt:185
+  if(LIBCXXABI_HERMETIC_STATIC_LIBRARY)
+    add_library(cxxabi_shared SHARED $<TARGET_OBJECTS:cxxabi_shared_objects>)
+  else()
----------------
ldionne wrote:
> Does it make any sense to have `LIBCXXABI_HERMETIC_STATIC_LIBRARY` and `LIBCXXABI_ENABLE_SHARED` at the same time? I don't understand why we're creating a target named `cxxabi_shared` when `LIBCXXABI_HERMETIC_STATIC_LIBRARY` is true.
When not building hermetic static library, we share objects between static and shared library, but when building the hermetic static library we cannot do that because those objects are build with different flags, hence this check. I've modified the code to follow the same pattern I used in libc++ build which hopefully makes it less confusing.


Repository:
  rCXXA libc++abi

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56026/new/

https://reviews.llvm.org/D56026





More information about the libcxx-commits mailing list