From fa8ce61acd0d057dd3859f9518d2545ecd1d52e8 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Thu, 31 Oct 2024 19:12:47 -0700 Subject: [PATCH] llvmPackages_19.compiler_rt: don't codesign The codesign binary is part of the bootstrapTools and is incompatible with the version required by the compiler_rt build. Remove find_program(.., codesign) from the cmake files to prevent the build from using and then breaking due to an incompatible codesign --- .../compilers/llvm/common/compiler-rt/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 9c634650dff2..30212e18bcaf 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -188,6 +188,13 @@ stdenv.mkDerivation ({ substituteInPlace ../libcxx/utils/merge_archives.py \ --replace-fail "import distutils.spawn" "from shutil import which as find_executable" \ --replace-fail "distutils.spawn." "" + '' + lib.optionalString (lib.versionAtLeast release_version "19") + # codesign in sigtool doesn't support the various options used by the build + # and is present in the bootstrap-tools. Removing find_program prevents the + # build from trying to use it and failing. + '' + substituteInPlace cmake/Modules/AddCompilerRT.cmake \ + --replace-fail 'find_program(CODESIGN codesign)' "" ''; # Hack around weird upsream RPATH bug