[llvm] 16f27e1 - [cmake] Don't use ld.lld when targeting Darwin
Shoaib Meenai via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 19:51:39 PDT 2020
Author: Shoaib Meenai
Date: 2020-08-20T19:51:29-07:00
New Revision: 16f27e1e18fd975238e5439f48273c5aa0b09594
URL: https://github.com/llvm/llvm-project/commit/16f27e1e18fd975238e5439f48273c5aa0b09594
DIFF: https://github.com/llvm/llvm-project/commit/16f27e1e18fd975238e5439f48273c5aa0b09594.diff
LOG: [cmake] Don't use ld.lld when targeting Darwin
ld.lld is an ELF linker. We can switch to the new LLD for Mach-O port
when it's more complete, but for now, assume the user will have set
CMAKE_LINKER correctly themselves when targeting Darwin.
Added:
Modified:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
index 706a1ffb5c7b..0aeaf663ad1c 100644
--- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -137,7 +137,7 @@ function(llvm_ExternalProject_Add name source_dir)
if(lld IN_LIST TOOLCHAIN_TOOLS)
if(_cmake_system_name STREQUAL Windows)
list(APPEND compiler_args -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/lld-link${CMAKE_EXECUTABLE_SUFFIX})
- else()
+ elseif(NOT _cmake_system_name STREQUAL Darwin)
list(APPEND compiler_args -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld${CMAKE_EXECUTABLE_SUFFIX})
endif()
endif()
More information about the llvm-commits
mailing list