[llvm-bugs] [Bug 37198] WebAssembly start component should be emitted with definition of the start function

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 29 16:28:41 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=37198

Andrew Kelley <andrew at ziglang.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|REOPENED                    |RESOLVED

--- Comment #14 from Andrew Kelley <andrew at ziglang.org> ---
Thank you for the clarification Sam. After reading the linked GitHub issue and
your comment, it is now my belief that the Zig project has no need for this
feature, as I now understand it.

What I thought it was was the equivalent of the ELF _start symbol, which calls
main(). In Zig there are several ways to create a build artifact:

build-obj - creates a relocatable object file
build-lib - creates a library
build-exe - creates an executable

Since Zig has no constructors (global variables & constants must be initialized
with constant data), no "init" hooks are needed. I only wanted to make sure
that the build artifact produced with `build-exe` would have the concept of an
entry point.

If there is no concept of an entry point then perhaps the correct thing to do
when build-exe is invoked with the wasm32-freestanding target is to print an
error such as "web assembly does not support an entry point function; you must
create a library".

I will put this issue back into the state that I found it in, which was
RESOLVED-WONTFIX.

Thanks for your time.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190529/29a0f110/attachment.html>


More information about the llvm-bugs mailing list