diff --git a/pkgs/development/compilers/llvm/18/default.nix b/pkgs/development/compilers/llvm/18/default.nix index f74a92f61cdc138..9a834eebde7e578 100644 --- a/pkgs/development/compilers/llvm/18/default.nix +++ b/pkgs/development/compilers/llvm/18/default.nix @@ -1,6 +1,6 @@ { lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja , preLibcCrossHeaders -, libxml2, python3, fetchFromGitHub, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith +, libxml2, python3, fetchFromGitHub, fetchpatch, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross , targetLlvm @@ -150,6 +150,13 @@ in let src = ../common/clang/clang-at-least-16-LLVMgold-path.patch; libllvmLibdir = "${tools.libllvm.lib}/lib"; }) + (fetchpatch { + name = "tweak-tryCaptureVariable-for-unevaluated-lambdas.patch"; + url = "https://github.com/llvm/llvm-project/commit/3d361b225fe89ce1d8c93639f27d689082bd8dad.patch"; + excludes = ["docs/ReleaseNotes.rst" "lib/Sema/TreeTransform.h"]; + stripLen = 1; + hash = "sha256-1NKej08R9SPlbDY/5b0OKUsHjX07i9brR84yXiPwi7E="; + }) ]; inherit llvm_meta; };