diff options
Diffstat (limited to 'src/web/build.sh')
| -rwxr-xr-x | src/web/build.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/web/build.sh b/src/web/build.sh index 48c784e..7443f46 100755 --- a/src/web/build.sh +++ b/src/web/build.sh @@ -3,6 +3,10 @@ # WebAssembly. needs clang with the wasm32 target and wasm-ld. the page # (src/web/index.html) loads it next to src/web/zc.js. set -e +case "${1:-}" in + --help|-h) printf '%s\n' 'usage: src/web/build.sh [OUTFILE.wasm]' 'builds the browser compiler vm; defaults to src/web/zc.wasm.' 'requires clang with wasm32 support and wasm-ld.'; exit 0 ;; + -*) echo "web build: unknown option $1; use --help for usage" >&2; exit 2 ;; +esac cd "$(dirname "$0")/../.." clang --target=wasm32 -O2 -w -fwrapv -nostdlib -fno-builtin -mbulk-memory -DJTYPE=int \ -Isrc/core -Isrc/micro src/micro/micro.c src/web/port_wasm.c \ |
