diff --git a/wasm_build.sh b/wasm_build.sh index 6ab7e63f..424e4757 100755 --- a/wasm_build.sh +++ b/wasm_build.sh @@ -8,8 +8,8 @@ fi if [ ! -d "./builddir_wasm" ]; then sed "s|EMSDK:|$1|g" wasm_cross.txt > /tmp/.wasm_cross.txt - meson -Dbindings=[''] -Db_lto=true -Ddefault_library=static -Dvector=false -Dlog=true --cross-file /tmp/.wasm_cross.txt builddir_wasm - cp ./test/wasm_test.html builddir_wasm/src/index.html + meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders=all -Dsavers=tvg -Dvector=false -Dlog=true --cross-file /tmp/.wasm_cross.txt builddir_wasm + cp ./test/wasm/wasm_test.html builddir_wasm/src/index.html fi ninja -C builddir_wasm/ diff --git a/wasm_cross.txt b/wasm_cross.txt index c56f6e4b..61a069b7 100644 --- a/wasm_cross.txt +++ b/wasm_cross.txt @@ -1,19 +1,21 @@ [binaries] -c = 'EMSDK:upstream/emscripten/emcc.py' cpp = 'EMSDK:upstream/emscripten/em++.py' ar = 'EMSDK:upstream/emscripten/emar.py' +strip = '-strip' [properties] root = 'EMSDK:upstream/emscripten/system' -cpp_args = ['--bind' , '-s' , 'WASM=1' , '-s' , 'ALLOW_MEMORY_GROWTH=1' , '-s' , 'FORCE_FILESYSTEM=1' , '-s' , 'USE_LIBPNG=1' , '-O2'] -cpp_link_args = ['--bind' , '-s' , 'WASM=1' , '-s' , 'ALLOW_MEMORY_GROWTH=1' , '-s' , 'FORCE_FILESYSTEM=1' , '-s' , 'USE_LIBPNG=1' , '-O2'] shared_lib_suffix = 'js' static_lib_suffix = 'js' shared_module_suffix = 'js' exe_suffix = 'js' +[built-in options] +cpp_args = ['-Wshift-negative-value', '--bind' , '-s' , 'WASM=1' , '-s' , 'ALLOW_MEMORY_GROWTH=1' , '-s' , 'FORCE_FILESYSTEM=1' , '-s' , '-O2', '-Wshift-negative-value'] +cpp_link_args = ['-Wshift-negative-value', '--bind' , '-s' , 'WASM=1' , '-s' , 'ALLOW_MEMORY_GROWTH=1' , '-s' , 'FORCE_FILESYSTEM=1' , '-s' , '-O2', '-Wshift-negative-value'] + [host_machine] system = 'emscripten' cpu_family = 'x86' cpu = 'i686' -endian = 'little' \ No newline at end of file +endian = 'little'