From 4614ca754df0b958e5433aecd0600cd33444c848 Mon Sep 17 00:00:00 2001 From: Ryan Lester Date: Tue, 26 Dec 2017 22:05:08 -0500 Subject: [PATCH] updates for latest emscripten --- dist-build/emscripten.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 38e2a616..d0e1e8bf 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -9,7 +9,7 @@ export TOTAL_MEMORY_SUMO=83886080 export TOTAL_MEMORY_TESTS=167772160 export LDFLAGS="-s RESERVED_FUNCTION_POINTERS=8" export LDFLAGS="${LDFLAGS} -s SINGLE_FILE=1" -export LDFLAGS="${LDFLAGS} -s NO_DYNAMIC_EXECUTION=1 -s ASSERTIONS=0" +export LDFLAGS="${LDFLAGS} -s ASSERTIONS=0" export LDFLAGS="${LDFLAGS} -s AGGRESSIVE_VARIABLE_ELIMINATION=1 -s ALIASING_FUNCTION_POINTERS=1" export LDFLAGS="${LDFLAGS} -s FUNCTION_POINTER_ALIGNMENT=1 -s DISABLE_EXCEPTION_CATCHING=1" export LDFLAGS="${LDFLAGS} -s ELIMINATE_DUPLICATE_FUNCTIONS=1" @@ -72,11 +72,11 @@ if [ "$DIST" = yes ]; then emccLibsodium () { outFile="${1}" shift - emcc "$CFLAGS" --llvm-lto 1 $CPPFLAGS $LDFLAGS $JS_EXPORTS_FLAGS ${@} \ + emcc "$CFLAGS" --closure 1 --llvm-lto 1 $CPPFLAGS $LDFLAGS $JS_EXPORTS_FLAGS ${@} \ "${PREFIX}/lib/libsodium.a" -o "${outFile}" || exit 1 } emmake make $MAKE_FLAGS install || exit 1 - emccLibsodium "${PREFIX}/lib/libsodium.asm.tmp.js" -Oz -s RUNNING_JS_OPTS=1 -s NO_EXIT_RUNTIME=1 + emccLibsodium "${PREFIX}/lib/libsodium.asm.tmp.js" -Oz -s RUNNING_JS_OPTS=1 emccLibsodium "${PREFIX}/lib/libsodium.wasm.tmp.js" -O3 -s WASM=1 cat > "${PREFIX}/lib/libsodium.js" <<- EOM