Merge pull request #114686 from bobrik/ivan/libcxx-block-backport

llvmPackages_11.libcxx: backport block.h fix from llvm12
This commit is contained in:
Sandro 2021-03-03 21:22:27 +01:00 committed by GitHub
commit 41a92df85e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
{ lib, stdenv, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
, enableShared ? !stdenv.hostPlatform.isStatic
}:
@ -15,7 +15,14 @@ stdenv.mkDerivation {
mv llvm-* llvm
'';
patches = lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
patches = [
(fetchpatch {
# Backported from LLVM 12, avoids clashes with commonly used "block.h" header.
url = "https://github.com/llvm/llvm-project/commit/19bc9ea480b60b607a3e303f20c7a3a2ea553369.patch";
sha256 = "sha256-aWa66ogmPkG0xHzSfcpD0qZyZQcNKwLV44js4eiun78=";
stripLen = 1;
})
] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py