Commit 8b820ed
authored
if no output is specified to wasm-opt, warn that we are emitting nothing (#1908)
A user that just does
```
wasm-opt input.wasm -O
```
may assume that the input file should have been optimized. But without `-o` we don't emit any output.
Often you may not want any output, like if you just want to run a pass like `--metrics`. But for most users wasm-opt is probably going to be used as an optimizer of files. So this PR suggests we emit a warning in that case.
For comparison, `llvm-opt` would print to the console, but it avoids printing a binary there so it issues a warning. Instead of this warning, perhaps we should do the same? That would also not be confusing.
Closes #19071 parent 90d0ee4 commit 8b820ed
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
| |||
0 commit comments