mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
wasm: add gl option to combined binary
This commit is contained in:
parent
f33b63abad
commit
7b9c58fec3
2 changed files with 23 additions and 2 deletions
21
cross/wasm32.txt
Normal file
21
cross/wasm32.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
[binaries]
|
||||
cpp = 'EMSDK:upstream/emscripten/em++.py'
|
||||
ar = 'EMSDK:upstream/emscripten/emar.py'
|
||||
strip = '-strip'
|
||||
|
||||
[properties]
|
||||
root = 'EMSDK:upstream/emscripten/system'
|
||||
shared_lib_suffix = 'js'
|
||||
static_lib_suffix = 'js'
|
||||
shared_module_suffix = 'js'
|
||||
exe_suffix = 'js'
|
||||
|
||||
[built-in options]
|
||||
cpp_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions']
|
||||
cpp_link_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions', '--bind', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sEXPORT_ES6=1', '-sFORCE_FILESYSTEM=1', '-sMODULARIZE=1', '-sEXPORTED_RUNTIME_METHODS=FS', '-sUSE_WEBGPU=1', '-sASYNCIFY=1', '-sSTACK_SIZE=4MB', '-sMAX_WEBGL_VERSION=2', '-sFULL_ES3']
|
||||
|
||||
[host_machine]
|
||||
system = 'emscripten'
|
||||
cpu_family = 'wasm32'
|
||||
cpu = 'wasm32'
|
||||
endian = 'little'
|
|
@ -21,8 +21,8 @@ if [ ! -d "./build_wasm" ]; then
|
|||
sed "s|EMSDK:|$EMSDK|g" ./cross/wasm32_gl.txt > /tmp/.wasm_cross.txt
|
||||
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all" -Dsavers="all" -Dthreads=false -Dbindings="wasm_beta" -Dengines="gl" --cross-file /tmp/.wasm_cross.txt build_wasm
|
||||
else
|
||||
sed "s|EMSDK:|$EMSDK|g" ./cross/wasm32_wg.txt > /tmp/.wasm_cross.txt
|
||||
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all" -Dsavers="all" -Dthreads=false -Dbindings="wasm_beta" -Dengines="wg, sw" --cross-file /tmp/.wasm_cross.txt build_wasm
|
||||
sed "s|EMSDK:|$EMSDK|g" ./cross/wasm32.txt > /tmp/.wasm_cross.txt
|
||||
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all" -Dsavers="all" -Dthreads=false -Dbindings="wasm_beta" -Dengines="wg, gl, sw" --cross-file /tmp/.wasm_cross.txt build_wasm
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue