diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix index daf4cfe808b..a15bcc872a6 100644 --- a/pkgs/development/compilers/llvm/13/llvm/default.nix +++ b/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -52,6 +52,13 @@ in stdenv.mkDerivation (rec { patches = [ ./gnu-install-dirs.patch + + # Fix random compiler crashes: https://bugs.llvm.org/show_bug.cgi?id=50611 + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4764a4f8c920912a2bfd8b0eea57273acfe0d8a8/trunk/no-strict-aliasing-DwarfCompileUnit.patch"; + sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g"; + stripLen = 1; + }) ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; postPatch = optionalString stdenv.isDarwin ''