llvmPackages_15.compiler-rt: drop codesign patch

This was added in 00839fea22 ("llvmPackages_15.compiler-rt: fixes for Darwin"),
which says:

> this introduces a codesigning related patch that we can drop once
> #195107 goes through

The referenced PR ("sigtool: 0.1.2 → 0.1.3") has now been merged, so
I'm dropping the patch as instructed.
This commit is contained in:
Alyssa Ross 2023-02-28 12:39:42 +00:00
parent 09b11341b9
commit 9bfc5871c1
2 changed files with 1 additions and 31 deletions

View File

@ -86,25 +86,7 @@ stdenv.mkDerivation {
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
# See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
./armv7l.patch
]
# The `compiler-rt` build inspects `ld` to figure out whether it needs to
# explicitly call `codesign`:
# https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/Modules/AddCompilerRT.cmake#L409-L422
#
# In our case, despite (currently) having an `ld` version than 609, we don't
# need an explicit codesigning step because `postLinkSignHook` handles this
# for us.
#
# Unfortunately there isn't an easy way to override
# `NEED_EXPLICIT_ADHOC_CODESIGN`.
#
# Adding `codesign` as a build input also doesn't currently work because, as
# of this writing, `codesign` in nixpkgs doesn't support the `--sign` alias
# which the `compiler-rt` build uses. See here for context:
# https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272116014
#
# So, for now, we patch `compiler-rt` to skip the explicit codesigning step.
++ lib.optional stdenv.hostPlatform.isDarwin ./skip-explicit-codesign.patch;
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra

View File

@ -1,12 +0,0 @@
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -406,7 +406,7 @@ function(add_compiler_rt_runtime name type)
if (HAD_ERROR)
message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}")
endif()
- set(NEED_EXPLICIT_ADHOC_CODESIGN 1)
+ set(NEED_EXPLICIT_ADHOC_CODESIGN 0) # `postLinkSignHook` handles this for us
if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*")
string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT})
if (HOST_LINK_VERSION VERSION_GREATER_EQUAL 609)