dmd.main

Entry point for DMD console version.

Discussion

This modules defines the entry point (main) for DMD, as well as related utilities needed for arguments parsing, path manipulation, etc... This file is not shared with other compilers which use the DMD front-end.

Authors

Walter Bright

Source: main.d

  • Declaration

    int main(int argc, char** argv);

    DMD's entry point, C main.

    Discussion

    Without -lowmem, we need to switch to the bump-pointer allocation scheme right from the start, before any module ctors are run, so we need this hook before druntime is initialized and _Dmain is called.

    Return Value

    Return code of the application

  • Declaration

    int _Dmain(char[][]);

    Manual D main (for druntime initialization), which forwards to tryMain.

    Return Value

    Return code of the application