r347026 - [CMake] Support cross-compiling with Fuchsia toolchain build
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 15 20:50:12 PST 2018
Author: phosek
Date: Thu Nov 15 20:50:12 2018
New Revision: 347026
URL: http://llvm.org/viewvc/llvm-project?rev=347026&view=rev
Log:
[CMake] Support cross-compiling with Fuchsia toolchain build
When second stage is being cross-compiled for a different platform
we need to build enough of first stage runtimes to get a working
compiler.
Differential Revision: https://reviews.llvm.org/D54463
Modified:
cfe/trunk/cmake/caches/Fuchsia.cmake
Modified: cfe/trunk/cmake/caches/Fuchsia.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/caches/Fuchsia.cmake?rev=347026&r1=347025&r2=347026&view=diff
==============================================================================
--- cfe/trunk/cmake/caches/Fuchsia.cmake (original)
+++ cfe/trunk/cmake/caches/Fuchsia.cmake Thu Nov 15 20:50:12 2018
@@ -1,6 +1,6 @@
# This file sets up a CMakeCache for a Fuchsia toolchain build.
-set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
+set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")
set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
@@ -43,6 +43,37 @@ elseif(UNIX)
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
endif()
+if(BOOTSTRAP_CMAKE_SYSTEM_NAME)
+ set(target "${BOOTSTRAP_CMAKE_CXX_COMPILER_TARGET}")
+ if(STAGE2_LINUX_${target}_SYSROOT)
+ set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_SYSROOT ${STAGE2_LINUX_${target}_SYSROOT} CACHE STRING "")
+ set(LLVM_BUILTIN_TARGETS "${target}" CACHE STRING "")
+
+ set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_SYSROOT ${STAGE2_LINUX_${target}_SYSROOT} CACHE STRING "")
+ set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXXABI_INSTALL_LIBRARY OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
+ set(RUNTIMES_${target}_SANITIZER_CXX_ABI "libc++" CACHE STRING "")
+ set(RUNTIMES_${target}_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
+ set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
+ set(LLVM_RUNTIME_TARGETS "${target}" CACHE STRING "")
+ endif()
+endif()
+
set(CLANG_BOOTSTRAP_TARGETS
check-all
check-llvm
More information about the cfe-commits
mailing list