This function will generate a module called __entrypoint,
and set the globals entrypoint and rootHasMain.
This used to be in druntime, but contained a reference to _Dmain
which didn't work when druntime was made into a dll and was linked
to a program, such as a C++ program, that didn't have a _Dmain.
Generate C main() in response to seeing D main().
This function will generate a module called __entrypoint, and set the globals entrypoint and rootHasMain.
This used to be in druntime, but contained a reference to _Dmain which didn't work when druntime was made into a dll and was linked to a program, such as a C++ program, that didn't have a _Dmain.