When cross-compiling the second stage to a different target, we need to
make sure that the first-stage compiler can produce binaries for that
target. Using lld and llvm-objcopy as the default linker and objcopy
tool eliminates some of the dependencies on the host toolchain.
Differential Revision: https://reviews.llvm.org/D54655
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347108
91177308-0d34-0410-b5e6-
96231b3b80d8
set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
endif()
+if(NOT APPLE)
+ set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
+ set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
+endif()
set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")