[lld] r332308 - [WebAssembly] Allow signautre of entry function to be flexible

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 16:51:50 PDT 2018


On Mon, May 14, 2018 at 7:00 PM, Sam Clegg <sbc at google.com> wrote:

> On Mon, May 14, 2018 at 6:15 PM, Dan Gohman <sunfish at mozilla.com> wrote:
> > Hi Sam,
> >
> > Sorry for the late arrival here. Are there use cases that need flexible
> > signatures? It seems like even if we can support it now, it's not
> > immediately obvious that we're always going to want to support it in the
> > future.
>
> The common use cases that I'm looking at are emscripten, and the wasm
> waterfall test
> which both basically do `--entry=main`.  Without this change this
> means every program
> would generate a linker warning about the entry point signature not
> being correct.
>

When using `--entry=main`, do you know what gets passed as the `argc` and
`argv` to main?


> This change is mostly to allow these use cases and suppress the
> warning in this case.
> If we update those two consumers I could see us reverting this change
> perhaps.  Is that
> what you are suggesting?
>

Yeah. If those are the only two consumers (that we know of), then updating
those consumers and going back to checking the signature seems desirable.
It's consistent with wasm in general, which is strict about signatures.
And, it would reduce the set of functionality we have to support.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180516/242fe300/attachment.html>


More information about the llvm-commits mailing list