[TS] Wrap `aligned_alloc` as well as other malloc's.
[ldk-java] / genbindings.sh
index 3d6ea6bcef5f033c9eae90f07c07a4f6f2513305..9d42bbbd25e2a6c5fa34d57dd564c2001d2ab3f8 100755 (executable)
@@ -203,7 +203,7 @@ else
        # 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=
-       [ "$3" != "false" ] && COMPILE="$COMPILE -Wl,-wrap,calloc -Wl,-wrap,realloc -Wl,-wrap,reallocarray -Wl,-wrap,malloc -Wl,-wrap,free"
+       [ "$3" != "false" ] && COMPILE="$COMPILE -Wl,-wrap,calloc -Wl,-wrap,realloc -Wl,-wrap,reallocarray -Wl,-wrap,malloc -Wl,-wrap,aligned_alloc -Wl,-wrap,free"
        if [ "$3" = "true" ]; then
                WASM_FILE=liblightningjs_debug.wasm
                $COMPILE -o liblightningjs_debug.wasm -g -I"$1"/lightning-c-bindings/include/ ts/bindings.c "$1"/lightning-c-bindings/target/wasm32-wasi/debug/libldk.a $EXTRA_LINK