tool/wasm-clangw
raw| 1 | #!/bin/sh |
| 2 | # A Clang wrapper script to fake the clang linker driver. |
| 3 | # Clang linker automatically uses wasm-opt with -O if it found. |
| 4 | # However optimization before asyncify causes misoptimization, |
| 5 | # so wrap clang to insert our fake wasm-opt, which does nothing, in PATH. |
| 6 | |
| 7 | src_dir="$(cd "$(dirname "$0")/../wasm" && pwd)" |
| 8 | export PATH="$src_dir:$PATH" |
| 9 | exec "$@" |