[libunwind] Support building hermetic static library
authorPetr Hosek <phosek@chromium.org>
Tue, 29 Jan 2019 23:01:08 +0000 (23:01 +0000)
committerPetr Hosek <phosek@chromium.org>
Tue, 29 Jan 2019 23:01:08 +0000 (23:01 +0000)
commit3cfc55cf9c09b46e5ca47aaa6bbd628d64f86d14
tree1c1dd00296aaacba846de784c344fdeb10239722
parentaecce85da62ae5db322c2d03bcf873077a7cff4d
[libunwind] Support building hermetic static library

This is useful when the static libunwind library is being linked into
shared libraries that may be used in with other shared libraries that
use different unwinder. We want to avoid avoid exporting libunwind
symbols in those cases. This achieved by a new CMake option which can be
enabled by libunwind vendors as needed.

The same CMake option has already been added to libc++ and libc++abi in
D55404 and D56026.

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

llvm-svn: 352559
libcxxabi/src/CMakeLists.txt
libunwind/CMakeLists.txt
libunwind/src/CMakeLists.txt