diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 42a6c950a39c..8fdf98d2c9de 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -427,6 +427,18 @@ let stripLen = 1; } ) + ++ + lib.optional + (lib.versionAtLeast metadata.release_version "12" && lib.versionOlder metadata.release_version "19") + # Add missing include headers to build against gcc-15: + # https://github.com/llvm/llvm-project/pull/101761 + ( + fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1.patch"; + hash = "sha256-1htuzsaPHbYgravGc1vrR8sqpQ/NSQ8PUZeAU8ucCFk="; + stripLen = 1; + } + ) ++ lib.optional (lib.versionOlder metadata.release_version "16") # Fix musl build.