Skip to content

Commit ffc3f68

Browse files
authored
Patch ghcjs >= 9.12: Add 'HEAP8' to EMCC:EXPORTED_RUNTIME_METHODS (#2428)
1 parent a052991 commit ffc3f68

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

overlays/bootstrap.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ in {
7777
from = start: final.lib.optional (versionAtLeast start);
7878
until = end: final.lib.optional (versionLessThan end);
7979
always = final.lib.optional true;
80-
onDarwin = final.lib.optionals final.stdenv.targetPlatform.isDarwin;
80+
onDarwin = final.lib.optionals final.stdenv.targetPlatform.isDarwin;
8181
onMusl = final.lib.optionals final.stdenv.targetPlatform.isMusl;
8282
onWindows = final.lib.optionals final.stdenv.targetPlatform.isWindows;
8383
onWindowsOrMusl = final.lib.optionals (final.stdenv.targetPlatform.isWindows || final.stdenv.targetPlatform.isMusl);
@@ -333,6 +333,7 @@ in {
333333
++ onAndroid (from "9.6" ./patches/ghc/ghc-9.6-COMPAT_R_ARM_PREL31.patch)
334334
++ onAndroid (from "9.10" ./patches/ghc/ghc-9.10-ignore-libc.patch)
335335

336+
++ onGhcjs (from "9.12" ./patches/ghc/ghc-9.12-ghcjs-rts-mem-heap8.patch)
336337
# Fix for `fatal error: 'rts/Types.h' file not found` when building `primitive`
337338
++ onGhcjs (from "9.13" ./patches/ghc/ghc-9.13-ghcjs-rts-types.patch)
338339

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/rts/js/mem.js b/rts/js/mem.js
2+
index 4a9adf09cd..68f63afece 100644
3+
--- a/rts/js/mem.js
4+
+++ b/rts/js/mem.js
5+
@@ -1,5 +1,5 @@
6+
//#OPTIONS:CPP
7+
-//#OPTIONS:EMCC:EXPORTED_RUNTIME_METHODS=addFunction,removeFunction,getEmptyTableSlot
8+
+//#OPTIONS:EMCC:EXPORTED_RUNTIME_METHODS=addFunction,removeFunction,getEmptyTableSlot,HEAP8
9+
10+
// #define GHCJS_TRACE_META 1
11+

0 commit comments

Comments
 (0)