Skip to content

Commit

Permalink
llvmPackages_15.compiler-rt: apply #186575 to llvmPackages_15
Browse files Browse the repository at this point in the history
  • Loading branch information
rrbutani committed Jan 27, 2023
1 parent 00839fe commit 09b8886
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pkgs/development/compilers/llvm/15/compiler-rt/default.nix
Original file line number Diff line number Diff line change
@@ -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
}:

Expand All @@ -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 = [
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 09b8886

Please sign in to comment.