[libcxx] Support building hermetic static library

This is useful when static libc++ library is being linked into
shared libraries that may be used in combination with libraries.
We want to avoid we exporting libc++ symbols in those cases where
this option is useful. This is provided as a CMake option and can
be enabled by libc++ vendors as needed.

Differential Revision: https://reviews.llvm.org/D55404

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@350489 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Petr Hosek
2019-01-06 06:14:31 +00:00
parent 6420803549
commit 9e444eb82d
3 changed files with 72 additions and 33 deletions

View File

@@ -222,6 +222,15 @@ libc++ specific options
Define libc++ destination prefix.
.. option:: LIBCXX_HERMETIC_STATIC_LIBRARY:BOOL
**Default**: ``OFF``
Do not export any symbols from the static libc++ library. This is useful when
This is useful when the static libc++ 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 any libc++ symbols in that case.
.. _libc++experimental options:
libc++experimental Specific Options