genCmain

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.

extern (C++)
void
genCmain

Parameters

sc
Type: Scope*

Scope which triggered the generation of the C main, used to get the module where the D main is.

Meta