update wasm build script
authorHermet Park <chuneon.park@samsung.com>
Tue, 2 Nov 2021 10:53:08 +0000 (19:53 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 4 Nov 2021 00:38:12 +0000 (09:38 +0900)
remove the deprecations and warnings.

wasm_build.sh
wasm_cross.txt

index 6ab7e63..424e475 100755 (executable)
@@ -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/
index c56f6e4..61a069b 100644 (file)
@@ -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'