This is useful when the static libc++abi library is being linked into
shared libraries that may be used in with other shared libraries that
use different C++ library. We want to avoid avoid exporting libc++abi
or libc++ symbols in those cases. This achieved by a new CMake option
which can be enabled by libc++abi vendors as needed.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This is a libc++abi counterpart of D55404. We combine both libc++abi and libc++ into a single static archive and for it to be hermetic, we need to make sure that both libc++abi and libc++ were built as such.
libcxxabi/src/CMakeLists.txt | ||
---|---|---|
185 ↗ | (On Diff #179359) | 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. |
libcxxabi/src/CMakeLists.txt | ||
---|---|---|
185 ↗ | (On Diff #179359) | 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. |