llvmPackages_{7,8,9}.{llvm-polly,libllvm-polly}: fix build with clang 16

Same fix as https://github.com/NixOS/nixpkgs/pull/265967.
This commit is contained in:
Randy Eckenrode 2023-11-25 15:27:18 -05:00
parent effbeb808b
commit 856eb81d1f
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9
3 changed files with 33 additions and 3 deletions

View file

@ -110,7 +110,17 @@ in stdenv.mkDerivation (rec {
}) })
../../llvm-7-musl.patch ../../llvm-7-musl.patch
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; ] ++ lib.optionals enablePolly [
./gnu-install-dirs-polly.patch
# Add missing isl header includess required to build LLVM 7 + Polly with clang 16.
(fetchpatch {
name = "polly-ppcg-isl-headers.patch";
url = "https://repo.or.cz/ppcg.git/patch/098ba285306114dc71497f7b51c357f69c9b4472";
hash = "sha256-c9L30rDROYAMbUSuaK9U/ixyFMlH/Sa1n+VgLODzSCQ=";
extraPrefix = "tools/polly/lib/External/ppcg/";
stripLen = 1;
})
];
postPatch = optionalString stdenv.isDarwin '' postPatch = optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \ substituteInPlace cmake/modules/AddLLVM.cmake \

View file

@ -117,7 +117,17 @@ in stdenv.mkDerivation (rec {
relative = "llvm"; relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
}) })
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; ] ++ lib.optionals enablePolly [
./gnu-install-dirs-polly.patch
# Add missing isl header includess required to build LLVM 8 + Polly with clang 16.
(fetchpatch {
name = "polly-ppcg-isl-headers.patch";
url = "https://repo.or.cz/ppcg.git/patch/098ba285306114dc71497f7b51c357f69c9b4472";
hash = "sha256-c9L30rDROYAMbUSuaK9U/ixyFMlH/Sa1n+VgLODzSCQ=";
extraPrefix = "tools/polly/lib/External/ppcg/";
stripLen = 1;
})
];
postPatch = optionalString stdenv.isDarwin '' postPatch = optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \ substituteInPlace cmake/modules/AddLLVM.cmake \

View file

@ -115,7 +115,17 @@ in stdenv.mkDerivation (rec {
relative = "llvm"; relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
}) })
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; ] ++ lib.optionals enablePolly [
./gnu-install-dirs-polly.patch
# Add missing isl header includess required to build LLVM 9 + Polly with clang 16.
(fetchpatch {
name = "polly-ppcg-isl-headers.patch";
url = "https://repo.or.cz/ppcg.git/patch/098ba285306114dc71497f7b51c357f69c9b4472";
hash = "sha256-c9L30rDROYAMbUSuaK9U/ixyFMlH/Sa1n+VgLODzSCQ=";
extraPrefix = "tools/polly/lib/External/ppcg/";
stripLen = 1;
})
];
postPatch = optionalString stdenv.isDarwin '' postPatch = optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \ substituteInPlace cmake/modules/AddLLVM.cmake \