From e7f410de109a672f74e71bc50caf0ebb9102a1df Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 17 Jan 2015 22:11:10 +0100 Subject: [PATCH] Emscripten: don't use a memory init file any more. It doesn't take that long to load the module, and it's going to make users' life way easier. --- configure.ac | 2 +- dist-build/emscripten.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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