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

Matt Harding via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 23 18:21:25 PDT 2023


majaha wrote:

> Can you point out what are the unsupported options here?

All of them, they are all options that translate to TargetOptions, and they do nothing for a wasm target triple:
` --trap-unreachable=false --xcoff-traceback-table=true --relax-elf-relocations=false --vec-extabi=true`

> I'm suggesting a warning only when an incompatible option is explicitly given in the command line.

I'm just trying to fix a bug and match how it currently works. If you want to change the behaviour to give more warnings, and especially only when an option is given on the command line, that's a more involved change that belongs in a separate issue.

> If you grep with report_fatal_error in all target's ***TargetMachine.cpp, there are many instances of reporting that some options are not supported. (I'm not necessarily suggesting erroring out though)

Most of these are hard errors, where there's a real contradiction between two requested features. Not so with TrapUnreachable and NoTrapAfterNoreturn, they are more like hints or suggestions, and can be ignored without breaking anything.

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


More information about the llvm-commits mailing list