[clang] Add wasm-opt warning (PR #100321)

Quentin Michaud via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 29 07:55:36 PDT 2024


mh4ck-Thales wrote:

I implemented a proposition on how to proceed for correctly informing users of wasm-opt problems:
- a warning for when no flags are passed (the default being wasm-opt enabled for wasip1) and wasm-opt is not found
- an error for when --wasm-opt is explicitly passed but wasm-opt is not found (as @alexcrichton suggested)
- another error for when --wasm-opt is explicitly passed but wasm-opt is not supported (wasip2 and components)

We can discuss and change this, especially for the warning "by default" that is controversial. I think that a warning is the way to go if we want to leave wasm-opt enabled as a default, otherwise people with different tooling end up with vastly differing results without knowing why, but the point of @alexcrichton on the annoyance of having a warning is relevant. Another solution could be to just print a message without using warnings? Is there a mechanism in LLVM for printing info notes?

https://github.com/llvm/llvm-project/pull/100321


More information about the cfe-commits mailing list