commit 74a91106eae2204ed9cfdadeb05038faef4946f6
parent b3bf7b06d8a4f08da7fb5c7518624a532d61f65b
Author: William Casarin <jb55@jb55.com>
Date: Sat, 12 Mar 2022 13:57:33 -0800
fix some minor wasm issues
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,5 +1,5 @@
-CFLAGS=-Wall -g -Os -Ideps/secp256k1/include -Ideps/libsodium/src/libsodium/include -Ideps
+CFLAGS=-Wall -Os -Ideps/secp256k1/include -Ideps/libsodium/src/libsodium/include -Ideps
LDFLAGS=
SUBMODULES=deps/secp256k1
@@ -163,7 +163,7 @@ target/wasm/lnsocket.wasm: target/tmp/lnsocket.js
target/tmp/lnsocket.js: $(WASM_ARS) lnsocket_pre.js
mkdir -p target/tmp
- emcc --pre-js lnsocket_pre.js -s ENVIRONMENT=web -s MODULARIZE -s 'EXPORTED_FUNCTIONS=["_free"]' -s EXPORTED_RUNTIME_METHODS=ccall,cwrap $(CFLAGS) -Wl,-whole-archive $(WASM_ARS) -Wl,-no-whole-archive -o target/tmp/lnsocket.js
+ emcc --pre-js lnsocket_pre.js -s ENVIRONMENT=web -s MODULARIZE -flto -s 'EXPORTED_FUNCTIONS=["_malloc", "_free"]' -s EXPORTED_RUNTIME_METHODS=ccall,cwrap $(CFLAGS) -Wl,-whole-archive $(WASM_ARS) -Wl,-no-whole-archive -o target/tmp/lnsocket.js
tags: fake
find . -name '*.c' -or -name '*.h' | xargs ctags