diff --git a/configure.ac b/configure.ac index edf9c519..69cae492 100644 --- a/configure.ac +++ b/configure.ac @@ -423,7 +423,7 @@ AC_SUBST([LIBTOOL_EXTRA_FLAGS]) TEST_LDFLAGS='' AS_IF([test "x$EMSCRIPTEN" != "x"],[ EXEEXT=.js - TEST_LDFLAGS='--pre-js pre.js.inc -s RESERVED_FUNCTION_POINTERS=8' + TEST_LDFLAGS='--memory-init-file 0 --pre-js pre.js.inc -s RESERVED_FUNCTION_POINTERS=8' ]) AC_SUBST(TEST_LDFLAGS) AM_CONDITIONAL([EMSCRIPTEN], [test "x$EMSCRIPTEN" != "x"]) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 0d4c9664..03d0818f 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -13,7 +13,7 @@ emconfigure ./configure --enable-minimal --disable-shared --prefix="$PREFIX" \ CFLAGS="-O3" && \ emmake make clean && \ emmake make $MAKE_FLAGS install V=1 && \ -emcc -O3 --closure 1 --llvm-lto 1 $LDFLAGS $JS_EXPORTS_FLAGS \ +emcc -O3 --closure 1 --llvm-lto 1 --memory-init-file 0 $LDFLAGS $JS_EXPORTS_FLAGS \ "${PREFIX}/lib/libsodium.a" -o "${PREFIX}/lib/libsodium.js" || exit 1 if test "x$NODE" = x; then