WebAssembly _start or crt_constructor not get called.
learnfirst1
learnfirst1 at gmail.com
Fri Aug 10 11:22:39 UTC 2018
On Friday, 10 August 2018 at 10:43:09 UTC, kinke wrote:
> I don't know about _start(), but please don't expect
> `pragma(crt_constructor)` to work. As the name says, these 'C
> runtime constructors' are normally invoked by the C runtime
> entry point, before calling the C main, all of which doesn't
> apply to WebAssembly or any other bare metal target.
please take a look at this:
http://llvm.org/doxygen/WebAssemblyLowerGlobalDtors_8cpp_source.html
Since LLVM can support WebAssembly GlobalCtors, LDC also append
crt_constructor into llvm::GlobalCtors, why not make ldc with
WebAssembly work same way.
More information about the digitalmars-d-ldc
mailing list