Skip to content

Commit 8527921

Browse files
committed
Fix for wasm and GHC >9.12
1 parent a5bff86 commit 8527921

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

compiler/ghc/default.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,16 +598,19 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
598598
patchShebangs .
599599
'' + lib.optionalString (targetPlatform.isWasm) ''
600600
substituteInPlace utils/jsffi/dyld.mjs \
601-
--replace-fail \
602-
"${buildPackages.nodejs-with-lto}/bin/node --disable-warning=ExperimentalWarning --experimental-wasm-type-reflection --no-turbo-fast-api-calls --wasm-lazy-validation" \
601+
--replace \
602+
"${buildPackages.nodejs-with-lto}/bin/node --disable-warning=ExperimentalWarning ${
603+
if builtins.compareVersions ghc-version "9.13" < 0
604+
then "--experimental-wasm-type-reflection"
605+
else "--max-old-space-size=65536"} --no-turbo-fast-api-calls --wasm-lazy-validation" \
603606
"${buildPackages.writeShellScriptBin "node" ''
604607
SCRIPT=$1
605608
shift
606609
LIB_WASM=$1
607610
shift
608611
exec ${buildPackages.nodejs-with-lto}/bin/node \
609612
--disable-warning=ExperimentalWarning \
610-
--experimental-wasm-type-reflection \
613+
--max-old-space-size=65536 \
611614
--no-turbo-fast-api-calls \
612615
--wasm-lazy-validation \
613616
"$SCRIPT" \

0 commit comments

Comments
 (0)