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

Alex Crichton via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 07:18:54 PDT 2024


alexcrichton wrote:

If wasm-opt is explicitly enabled via a flag, then I think it would make sense for this to be an error rather than a warning. Otherwise though if no default behavior was indicated then I would personally fear the churn of this change as most developers I know of on `wasm32-wasip1` don't have `wasm-opt` in their path meaning that this would create many un-suppressable warnings by default for these projects.

Personally I think that `wasm-opt` should be disabled by default since it's an optional tool to be coupled with a toolchain and it means that the same compiler invocation can produce drastically different results on the same version of LLVM depending on the execution environment. I realize though that disabling it by default is probably controversial, so short of that I don't know how best to thread this needle and communicate the lack of `wasm-opt` to end users.

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


More information about the cfe-commits mailing list