summaryrefslogtreecommitdiff
path: root/build-js.sh
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-11-01 19:14:35 -0700
committerGitHub <noreply@github.com>2018-11-01 19:14:35 -0700
commit0ed4d2fabb8dcfcdf4e5ca79480f75db476fec76 (patch)
tree315aefbc87d8b8a096c4acc2db5c4ad621dbd83f /build-js.sh
parentc0977d3c25d3dc695677ba97df5eaae34ec63391 (diff)
downloadbinaryen-0ed4d2fabb8dcfcdf4e5ca79480f75db476fec76.tar.gz
binaryen-0ed4d2fabb8dcfcdf4e5ca79480f75db476fec76.tar.bz2
binaryen-0ed4d2fabb8dcfcdf4e5ca79480f75db476fec76.zip
Add pass to minify import and export names (#1719)
This new pass minifies import and export names, for example, this may minify (import "env" "longname" (func $internal)) to (import "env" "a" (func $internal)) By updating the JS that provides those imports/calls those exports, we can use the minified names properly. This can save a useful amount of space in the wasm and JS, see kripken/emscripten#7414
Diffstat (limited to 'build-js.sh')
-rwxr-xr-xbuild-js.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/build-js.sh b/build-js.sh
index f87e84a47..f75dd8f0e 100755
--- a/build-js.sh
+++ b/build-js.sh
@@ -112,6 +112,7 @@ echo "building shared bitcode"
$BINARYEN_SRC/passes/MergeBlocks.cpp \
$BINARYEN_SRC/passes/MergeLocals.cpp \
$BINARYEN_SRC/passes/Metrics.cpp \
+ $BINARYEN_SRC/passes/MinifyImportsAndExports.cpp \
$BINARYEN_SRC/passes/NameList.cpp \
$BINARYEN_SRC/passes/OptimizeInstructions.cpp \
$BINARYEN_SRC/passes/PickLoadSigns.cpp \