From 694c7b2798e88f1e4f5c24f8d59ab40a3f957cab Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Sun, 15 Jan 2023 16:14:51 -0800 Subject: [PATCH] llvmPackages_15.compiler-rt: apply #186575 to `llvmPackages_15` --- .../compilers/llvm/15/compiler-rt/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/llvm/15/compiler-rt/default.nix b/pkgs/development/compilers/llvm/15/compiler-rt/default.nix index 3bbb8a23c7708..16520243ebe85 100644 --- a/pkgs/development/compilers/llvm/15/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/15/compiler-rt/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, llvm_meta, version , monorepoSrc, runCommand -, cmake, python3, libllvm, libcxxabi, libxcrypt +, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt , doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD }: @@ -27,7 +27,8 @@ stdenv.mkDerivation { inherit src; sourceRoot = "${src.name}/${baseName}"; - nativeBuildInputs = [ cmake python3 libllvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ] + ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ @@ -80,10 +81,13 @@ stdenv.mkDerivation { # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # extra `/`. ./normalize-var.patch - ] # Prevent a compilation error on darwin - ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch - ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch - + # Prevent a compilation error on darwin + ./darwin-targetconditionals.patch + # See: https://github.com/NixOS/nixpkgs/pull/186575 + ../../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