From c624cc252738c30ada3f00a498e971a7a3a84196 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 21 Mar 2022 18:32:03 -0700 Subject: [PATCH] [CMake][Clang] Skip host link version detection for lld on Darwin When lld is being used as host linker, skip version detection since lld version cannot be used interchangeably with ld64 version and lld is already handled specially in Clang driver. Differential Revision: https://reviews.llvm.org/D122109 --- clang/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 937a8467df1d..78f584f18bac 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -403,7 +403,7 @@ endif () # Determine HOST_LINK_VERSION on Darwin. set(HOST_LINK_VERSION) -if (APPLE) +if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*") set(LD_V_OUTPUT) execute_process( COMMAND sh -c "${CMAKE_LINKER} -v 2>&1 | head -1"