llvmPackages_[14-17].lldb: fix build with clang-19 (#373938)

This commit is contained in:
Austin Horstman
2025-01-19 13:21:23 -06:00
committed by GitHub
2 changed files with 17 additions and 3 deletions
@@ -713,7 +713,21 @@ let
# FIXME: do we need this after 15?
(metadata.getVersionFile "lldb/procfs.patch")
]
++ lib.optional (lib.versionOlder metadata.release_version "17") resourceDirPatch
++ lib.optional (lib.versionOlder metadata.release_version "18") (fetchpatch {
name = "libcxx-19-char_traits.patch";
url = "https://github.com/llvm/llvm-project/commit/68744ffbdd7daac41da274eef9ac0d191e11c16d.patch";
stripLen = 1;
hash = "sha256-QCGhsL/mi7610ZNb5SqxjRGjwJeK2rwtsFVGeG3PUGc=";
})
++ lib.optionals (lib.versionOlder metadata.release_version "17") [
resourceDirPatch
(fetchpatch {
name = "add-cstdio.patch";
url = "https://github.com/llvm/llvm-project/commit/73e15b5edb4fa4a77e68c299a6e3b21e610d351f.patch";
stripLen = 1;
hash = "sha256-eFcvxZaAuBsY/bda1h9212QevrXyvCHw8Cr9ngetDr0=";
})
]
++ lib.optional (lib.versionOlder metadata.release_version "14") (
metadata.getVersionFile "lldb/gnu-install-dirs.patch"
)
@@ -127,13 +127,13 @@ stdenv.mkDerivation (rec {
# TODO: cleanup with mass-rebuild
installCheckPhase = ''
if [ ! -e $lib/${python3.sitePackages}/lldb/_lldb*.so ] ; then
if [ ! -e ''${!outputLib}/${python3.sitePackages}/lldb/_lldb*.so ] ; then
echo "ERROR: python files not installed where expected!";
return 1;
fi
'' # Something lua is built on older versions but this file doesn't exist.
+ lib.optionalString (lib.versionAtLeast release_version "14") ''
if [ ! -e "$lib/lib/lua/${lua5_3.luaversion}/lldb.so" ] ; then
if [ ! -e "''${!outputLib}/lib/lua/${lua5_3.luaversion}/lldb.so" ] ; then
echo "ERROR: lua files not installed where expected!";
return 1;
fi