[PATCH] D22896: [LLVM] Add LLVM_ENABLE_LLD option to use LLD as C/C++ linker.
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 17:53:55 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL277093: Add LLVM_ENABLE_LLD option to use LLD as C/C++ linker. (authored by eugenezelenko).
Changed prior to commit:
https://reviews.llvm.org/D22896?vs=66060&id=66066#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22896
Files:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
@@ -144,6 +144,12 @@
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
Index: llvm/trunk/CMakeLists.txt
===================================================================
--- llvm/trunk/CMakeLists.txt
+++ llvm/trunk/CMakeLists.txt
@@ -317,6 +317,7 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22896.66066.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160729/061bc6c7/attachment.bin>
More information about the llvm-commits
mailing list