[compiler-rt] [compiler-rt] Don't rely on automatic codesigning with Apple's linker (PR #91681)

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 15:47:46 PDT 2024


================
@@ -387,35 +387,35 @@ function(add_compiler_rt_runtime name type)
         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
       endif()
       if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*")
-        # Ad-hoc sign the dylibs when using Xcode versions older than 12.
-        # Xcode 12 shipped with ld64-609.
-        # FIXME: Remove whole conditional block once everything uses Xcode 12+.
-        set(LD_V_OUTPUT)
+        # Apple's linker signs the resulting dylib with an ad-hoc code signature in
+        # most situations, except:
+        # 1. Versions of ld64 prior to ld64-609 in Xcode 12 predate this behavior.
+        # 2. Apple's new linker does not when building with `-darwin-target-variant`
+        #    to support macOS Catalyst.
----------------
yln wrote:

According to this (and assuming we can drop support for the old linker) would be to ensure the linker behaves consistently and always codesigns, right?

(Not asking for this in this PR, just wanted to make sure I understand.)

https://github.com/llvm/llvm-project/pull/91681


More information about the llvm-commits mailing list