r347108 - [CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 16 15:07:03 PST 2018


Author: phosek
Date: Fri Nov 16 15:07:03 2018
New Revision: 347108

URL: http://llvm.org/viewvc/llvm-project?rev=347108&view=rev
Log:
[CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia

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

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=347108&r1=347107&r2=347108&view=diff
==============================================================================
--- cfe/trunk/cmake/caches/Fuchsia.cmake (original)
+++ cfe/trunk/cmake/caches/Fuchsia.cmake Fri Nov 16 15:07:03 2018
@@ -22,6 +22,10 @@ if(NOT APPLE)
   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 "")
 




More information about the cfe-commits mailing list