]> granicus.if.org Git - clang/commitdiff
[CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain
authorPetr Hosek <phosek@chromium.org>
Wed, 25 Jul 2018 01:44:22 +0000 (01:44 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 25 Jul 2018 01:44:22 +0000 (01:44 +0000)
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

cmake/caches/Fuchsia-stage2.cmake

index 7264f90d4e5968c578c8973b4c9a5a322e37b296..28e179513475b96bb564a56f0627abccb4f231e1 100644 (file)
@@ -100,9 +100,15 @@ if(FUCHSIA_SDK)
     set(RUNTIMES_${target}-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "")
     set(RUNTIMES_${target}-fuchsia_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBUNWIND_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBCXXABI_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY OFF CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "")
   endforeach()
 
   set(LLVM_RUNTIME_SANITIZERS "Address" CACHE STRING "")