[llvm-branch-commits] [llvm-branch] r278428 - Merging r277093:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 11 14:55:38 PDT 2016


Author: hans
Date: Thu Aug 11 16:55:38 2016
New Revision: 278428

URL: http://llvm.org/viewvc/llvm-project?rev=278428&view=rev
Log:
Merging r277093:
------------------------------------------------------------------------
r277093 | eugenezelenko | 2016-07-28 17:46:13 -0700 (Thu, 28 Jul 2016) | 4 lines

Add LLVM_ENABLE_LLD option to use LLD as C/C++ linker.

Differential revision: https://reviews.llvm.org/D22896

------------------------------------------------------------------------

Modified:
    llvm/branches/release_39/   (props changed)
    llvm/branches/release_39/CMakeLists.txt
    llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake

Propchange: llvm/branches/release_39/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 11 16:55:38 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277114,277135,277371,277500,277504,277625,277691,277693,277773,278002,278086,278133,278370,278413
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277500,277504,277625,277691,277693,277773,278002,278086,278133,278370,278413

Modified: llvm/branches/release_39/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/CMakeLists.txt?rev=278428&r1=278427&r2=278428&view=diff
==============================================================================
--- llvm/branches/release_39/CMakeLists.txt (original)
+++ llvm/branches/release_39/CMakeLists.txt Thu Aug 11 16:55:38 2016
@@ -293,6 +293,7 @@ endif()
 option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF)
 option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
 option(LLVM_ENABLE_LIBCXXABI "Use libc++abi when using libc++." OFF)
+option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
 option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
 option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
 

Modified: llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake?rev=278428&r1=278427&r2=278428&view=diff
==============================================================================
--- llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake Thu Aug 11 16:55:38 2016
@@ -144,6 +144,12 @@ function(add_flag_or_print_warning flag
   endif()
 endfunction()
 
+if(LLVM_ENABLE_LLD)
+  check_cxx_compiler_flag("-fuse-ld=lld" CXX_SUPPORTS_LLD)
+  append_if(CXX_SUPPORTS_LLD "-fuse-ld=lld"
+    CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+endif()
+
 if( LLVM_ENABLE_PIC )
   if( XCODE )
     # Xcode has -mdynamic-no-pic on by default, which overrides -fPIC. I don't




More information about the llvm-branch-commits mailing list