[libcxx-commits] [libcxxabi] r352559 - [libunwind] Support building hermetic static library
Petr Hosek via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 29 15:01:09 PST 2019
Author: phosek
Date: Tue Jan 29 15:01:08 2019
New Revision: 352559
URL: http://llvm.org/viewvc/llvm-project?rev=352559&view=rev
Log:
[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
Modified:
libcxxabi/trunk/src/CMakeLists.txt
Modified: libcxxabi/trunk/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/CMakeLists.txt?rev=352559&r1=352558&r2=352559&view=diff
==============================================================================
--- libcxxabi/trunk/src/CMakeLists.txt (original)
+++ libcxxabi/trunk/src/CMakeLists.txt Tue Jan 29 15:01:08 2019
@@ -218,7 +218,11 @@ endif()
if (LIBCXXABI_ENABLE_STATIC)
if (LIBCXXABI_USE_LLVM_UNWINDER AND LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY)
if (TARGET unwind_static OR HAVE_LIBUNWIND)
- list(APPEND cxxabi_static_sources $<TARGET_OBJECTS:unwind_objects>)
+ if(LIBUNWIND_HERMETIC_STATIC_LIBRARY)
+ list(APPEND cxxabi_static_sources $<TARGET_OBJECTS:unwind_static_objects>)
+ else()
+ list(APPEND cxxabi_static_sources $<TARGET_OBJECTS:unwind_objects>)
+ endif()
endif()
endif()
add_library(cxxabi_static STATIC ${cxxabi_static_sources})
More information about the libcxx-commits
mailing list