From e64722f686bd8a6d0c2c099ce6fb90e84f51341d Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 18 May 2022 17:09:23 +0000 Subject: [PATCH] [CMake][Fuchsia] Build runtimes as universal libraries on OS X We want to build libunwind, libc++abi and libc++ as universal libraries supporting both x86_64 and arm64 architectures. Differential Revision: https://reviews.llvm.org/D125908 --- clang/cmake/caches/Fuchsia-stage2.cmake | 5 +++-- clang/cmake/caches/Fuchsia.cmake | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake index 5d9257951e71..6a00556e977f 100644 --- a/clang/cmake/caches/Fuchsia-stage2.cmake +++ b/clang/cmake/caches/Fuchsia-stage2.cmake @@ -61,10 +61,11 @@ if(APPLE) set(LIBCXXABI_INSTALL_LIBRARY OFF CACHE BOOL "") set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") - set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") + set(LIBCXX_ABI_VERSION 2 CACHE STRING "") set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") - set(LIBCXX_ABI_VERSION 2 CACHE STRING "") + set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") + set(RUNTIMES_CMAKE_ARGS "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" CACHE STRING "") endif() if(WIN32) diff --git a/clang/cmake/caches/Fuchsia.cmake b/clang/cmake/caches/Fuchsia.cmake index f7b51d586133..7b534e61f952 100644 --- a/clang/cmake/caches/Fuchsia.cmake +++ b/clang/cmake/caches/Fuchsia.cmake @@ -69,7 +69,9 @@ else() set(LIBCXX_ABI_VERSION 2 CACHE STRING "") set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "") + set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "") + set(RUNTIMES_CMAKE_ARGS "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" CACHE STRING "") endif() if(BOOTSTRAP_CMAKE_SYSTEM_NAME)