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

Mark Rowe via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 17:28:24 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.
----------------
bdash wrote:

I think this would all need to remain even if support is dropped for the old linker, purely for Catalyst scenario. The detection of `-o linker-signed` will be able to go away at that point since all versions of the developer tools that support the new linker also support that option.

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


More information about the llvm-commits mailing list