[llvm] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 16:49:12 PDT 2023


aheejin wrote:

> Hmm. It's not that the two options are incompatible with Wasm per se.

Aren't they imcompatible at the moment?

> Rather, overriding their values is an implementation detail of the Wasm backend. The implementation could change in the future, making the options meaningful for the Wasm backend again, and we don't want to be adding or removing errors and warnings over implementation details changing.

If you think erroring out is too strong, we can warn. If Wasm backend later supports it, we can remove the warning. If you want to ignore/override a command line option given by a user, I think it's better to be explicit about it than silent. I'm talking about when `--no-trap-after-noreturn` is explicitly given by a user, which is unlikely to happen to most of normal users.

> I don't think other target options work the way you suggest, do they? Is there any precedent for that?

I can find a plenty of cases if I search with `warn` or `report_fatal_error` in the subdirectories of `lib/Target`. All targets warn/error all the time for unsupported options.



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


More information about the llvm-commits mailing list