···254254 hash = "sha256-2IpdSyye3VT4VB95WurnyRFtdN1lfVtYpgEiUVhfNjw=";
255255 })
256256 ]
257257+ ++ [
258258+ # LLVM 19 turned on WASM reference types by default, exposing a bug
259259+ # that broke the Mozilla WASI build. Supposedly, it has been fixed
260260+ # upstream in LLVM, but the build fails in the same way for us even
261261+ # with LLVM 19 versions that contain the upstream patch.
262262+ #
263263+ # Apply the temporary patch Mozilla used to work around this bug
264264+ # for now until someone can investigate what’s going on here.
265265+ #
266266+ # TODO: Please someone figure out what’s up with this.
267267+ #
268268+ # See: <https://bugzilla.mozilla.org/show_bug.cgi?id=1905251>
269269+ # See: <https://github.com/llvm/llvm-project/pull/97451>
270270+ (fetchpatch {
271271+ name = "wasi-sdk-disable-reference-types.patch";
272272+ url = "https://hg.mozilla.org/integration/autoland/raw-rev/23a9f6555c7c";
273273+ hash = "sha256-CRywalJlRMFVLITEYXxpSq3jLPbUlWKNRHuKLwXqQfU=";
274274+ })
275275+ ]
257276 ++ extraPatches;
258277259278 postPatch = ''