mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00

revise the compile options to optmize the binary size. also remove all compile warnings. size: 552616 -> 446847
12 lines
489 B
Bash
Executable file
12 lines
489 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ! -d "./build_wasm" ]; then
|
|
sed "s|EMSDK:|$1|g" wasm_cross.txt > /tmp/.wasm_cross.txt
|
|
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all, lottie_beta" -Dsavers="all" -Dlog=true --cross-file /tmp/.wasm_cross.txt build_wasm
|
|
cp ./test/wasm/wasm_test.html build_wasm/src/index.html
|
|
fi
|
|
|
|
ninja -C build_wasm/
|
|
echo "RESULT:"
|
|
echo " thorvg-wasm.wasm and thorvg-wasm.js can be found in build_wasm/src folder"
|
|
ls -lrt build_wasm/src/thorvg-wasm.*
|