Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CMake option to explicitly skip wasm-opt and use `wasm-tools stri…
…p` instead. (#89) As per #8, it seems the main purpose of using wasm-opt was to reduce module size by stripping debug sections. The comment in the CMake file also indicates an intent to optimize the binary. However, `wasm-opt -O3` is extremely expensive on large programs; on my 18-core, 36-thread workstation, it took several minutes to complete. This is very painful when part of a debug loop that requires release builds (e.g. for performance features). This PR adds a `USE_WASM_OPT` CMake option, on by default to preserve existing behavior, that allows one to do `cmake -DCMAKE_BUILD_TYPE=Release -DUSE_WASM_OPT=OFF` to get a release build without `wasm-opt`. In its place, this PR uses `wasm-tools strip -a`, which strips debug sections (and all other custom sections) without rewriting code.
- Loading branch information