Index: cmake/caches/Fuchsia-stage2.cmake =================================================================== --- cmake/caches/Fuchsia-stage2.cmake +++ cmake/caches/Fuchsia-stage2.cmake @@ -27,11 +27,31 @@ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "") -set(LLVM_BUILTIN_TARGETS "x86_64-fuchsia-none;aarch64-fuchsia-none" CACHE STRING "") -set(BUILTINS_x86_64-fuchsia-none_CMAKE_SYSROOT ${FUCHSIA_SYSROOT} CACHE STRING "") -set(BUILTINS_x86_64-fuchsia-none_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") -set(BUILTINS_aarch64-fuchsia-none_CMAKE_SYSROOT ${FUCHSIA_SYSROOT} CACHE STRING "") -set(BUILTINS_aarch64-fuchsia-none_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") +set(LLVM_BUILTIN_TARGETS "default;x86_64-unknown-fuchsia;aarch64-unknown-fuchsia" CACHE STRING "") +set(BUILTINS_x86_64-unknown-fuchsia_CMAKE_SYSROOT ${FUCHSIA_x86_64_SYSROOT} CACHE PATH "") +set(BUILTINS_x86_64-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") +set(BUILTINS_aarch64-unknown-fuchsia_CMAKE_SYSROOT ${FUCHSIA_aarch64_SYSROOT} CACHE PATH "") +set(BUILTINS_aarch64-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") + +set(LLVM_RUNTIME_TARGETS "default;x86_64-unknown-fuchsia;aarch64-unknown-fuchsia" CACHE STRING "") + +set(RUNTIMES_x86_64-unknown-fuchsia_CMAKE_SYSROOT ${FUCHSIA_x86_64_SYSROOT} CACHE PATH "") +set(RUNTIMES_x86_64-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") +set(RUNTIMES_x86_64-unknown-fuchsia_UNIX 1 CACHE BOOL "") +set(RUNTIMES_x86_64-unknown-fuchsia_LLVM_ENABLE_LIBCXX ON CACHE BOOL "") +set(RUNTIMES_x86_64-unknown-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") +set(RUNTIMES_x86_64-unknown-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") +set(RUNTIMES_x86_64-unknown-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") +set(RUNTIMES_x86_64-unknown-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") + +set(RUNTIMES_aarch64-unknown-fuchsia_CMAKE_SYSROOT ${FUCHSIA_aarch64_SYSROOT} CACHE PATH "") +set(RUNTIMES_aarch64-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "") +set(RUNTIMES_aarch64-unknown-fuchsia_UNIX 1 CACHE BOOL "") +set(RUNTIMES_aarch64-unknown-fuchsia_LLVM_ENABLE_LIBCXX ON CACHE BOOL "") +set(RUNTIMES_aarch64-unknown-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") +set(RUNTIMES_aarch64-unknown-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") +set(RUNTIMES_aarch64-unknown-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") +set(RUNTIMES_aarch64-unknown-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") # Setup toolchain. set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") @@ -61,8 +81,7 @@ LTO clang-format clang-headers - builtins-x86_64-fuchsia-none - builtins-aarch64-fuchsia-none + builtins runtimes ${LLVM_TOOLCHAIN_TOOLS} CACHE STRING "") Index: cmake/caches/Fuchsia.cmake =================================================================== --- cmake/caches/Fuchsia.cmake +++ cmake/caches/Fuchsia.cmake @@ -38,8 +38,12 @@ install-distribution clang CACHE STRING "") -if(FUCHSIA_SYSROOT) - set(EXTRA_ARGS -DFUCHSIA_SYSROOT=${FUCHSIA_SYSROOT}) +if(FUCHSIA_x86_64_SYSROOT) + list(APPEND EXTRA_ARGS -DFUCHSIA_x86_64_SYSROOT=${FUCHSIA_x86_64_SYSROOT}) +endif() + +if(FUCHSIA_aarch64_SYSROOT) + list(APPEND EXTRA_ARGS -DFUCHSIA_aarch64_SYSROOT=${FUCHSIA_aarch64_SYSROOT}) endif() # Setup the bootstrap build.