llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Graham Christensen (grahamc) <details> <summary>Changes</summary> Skipping HOST_LINK_VERSION detection when CMAKE_LINKER matches .*lld.* is too broad. Since that matched the entire path, "lld" in unrelated parts of the directory structure would erroneously match. This happened on a real environment when "lld" appeared in the Nix store path hash for a recent build. --- Full diff: https://github.com/llvm/llvm-project/pull/242747.diff 1 Files Affected: - (modified) clang/CMakeLists.txt (+2-1) ``````````diff diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index fbb4cfaf09005..5a83d51ac949c 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -444,7 +444,8 @@ endif () # Determine HOST_LINK_VERSION on Darwin. set(HOST_LINK_VERSION "" CACHE STRING "Host linker version on Darwin") -if (APPLE AND NOT HOST_LINK_VERSION AND NOT CMAKE_LINKER MATCHES ".*lld.*") +get_filename_component(CLANG_LINKER_NAME "${CMAKE_LINKER}" NAME) +if (APPLE AND NOT HOST_LINK_VERSION AND NOT CLANG_LINKER_NAME MATCHES "lld") get_darwin_linker_version(HOST_LINK_VERSION) set(HOST_LINK_VERSION "${HOST_LINK_VERSION}" CACHE STRING "Host linker version on Darwin" FORCE) endif() `````````` </details> https://github.com/llvm/llvm-project/pull/242747 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
