Skip to content

Commit 348f122

Browse files
committed
[CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain
When building libc++ for Fuchsia, we want to distribute shared libc++, libc++abi and libunwind as separate libraries, but for static versions we would like to link all of them into libc++ so -lc++ flag has the same effect whether shared or static library is being used. Differential Revision: https://reviews.llvm.org/D49628 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337877 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent cbf4282 commit 348f122

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/caches/Fuchsia-stage2.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,15 @@ if(FUCHSIA_SDK)
100100
set(RUNTIMES_${target}-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "")
101101
set(RUNTIMES_${target}-fuchsia_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
102102
set(RUNTIMES_${target}-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
103+
set(RUNTIMES_${target}-fuchsia_LIBUNWIND_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "")
103104
set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
104105
set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
106+
set(RUNTIMES_${target}-fuchsia_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
107+
set(RUNTIMES_${target}-fuchsia_LIBCXXABI_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "")
108+
set(RUNTIMES_${target}-fuchsia_LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY OFF CACHE BOOL "")
105109
set(RUNTIMES_${target}-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
110+
set(RUNTIMES_${target}-fuchsia_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
111+
set(RUNTIMES_${target}-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "")
106112
endforeach()
107113

108114
set(LLVM_RUNTIME_SANITIZERS "Address" CACHE STRING "")

0 commit comments

Comments
 (0)