compileWASM.sh 359 B

1234567891011121314151617
  1. #!/bin/sh
  2. # -*- coding: utf-8 -*-
  3. # sh compileWASM.sh hyphenEngine
  4. SRCFILE="$1.asm.js"
  5. WASTNAME="$1.wast"
  6. WASMNAME="$1.wasm"
  7. echo 'running asm2wasm...'
  8. ./third-party/binaryen/bin/asm2wasm $SRCFILE -O4 -m 2097152 -mm 16777216 > $WASTNAME
  9. echo 'optimize > WASM...'
  10. ./third-party/binaryen/bin/wasm-opt $WASTNAME -O4 -o $WASMNAME
  11. wc -c $WASMNAME
  12. rm $WASTNAME