From: Matt Corallo Date: Sat, 8 Jan 2022 23:57:00 +0000 (+0000) Subject: [TS] Configure memory setup in linker to not insta-OOM X-Git-Tag: v0.0.104.1^2~14 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=a18326f4021652cd31d5b092b1f6cf02d49f5116;p=ldk-java [TS] Configure memory setup in linker to not insta-OOM --- diff --git a/genbindings.sh b/genbindings.sh index bb14f62f..25c8ffbe 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -199,7 +199,7 @@ else cat ts/bindings.c.body >> ts/bindings.c echo "Building TS bindings..." - COMPILE="$COMMON_COMPILE -flto -Wl,--no-entry -nostdlib --target=wasm32-wasi" + COMPILE="$COMMON_COMPILE -flto -Wl,--no-entry -nostdlib --target=wasm32-wasi -Wl,-z -Wl,stack-size=$((8*1024*1024)) -Wl,--initial-memory=$((16*1024*1024)) -Wl,--max-memory=$((1024*1024*1024)) -Wl,--global-base=4096" # We only need malloc and assert/abort, but for now just use WASI for those: #EXTRA_LINK=/usr/lib/wasm32-wasi/libc.a EXTRA_LINK=