dmd.mars

Entry point for DMD.

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.

Members

Aliases

MainFunc
alias MainFunc = int function(char[][] args)
Undocumented in source.

Functions

_Dmain
int _Dmain(char[][] )

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

_d_run_main
int _d_run_main(int argc, char** argv, MainFunc dMain)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
addDefaultVersionIdentifiers
void addDefaultVersionIdentifiers(Param params)

Add default version identifier for dmd, and set the target platform in params. https://dlang.org/spec/version.html#predefined-versions

createModules
Modules createModules(Strings files, Strings libmodules)

Creates the list of modules based on the files provided

flushMixins
void flushMixins()

we want to write the mixin expansion file also on error, but there are too many ways to terminate dmd (e.g. fatal() which calls exit(EXIT_FAILURE)), so we can't rely on scope(exit) ... in tryMain() actually being executed so we add atexit(&flushMixins); for those fatal exits (with the GC still valid)

generateJson
void generateJson(Modules* modules)
Undocumented in source. Be warned that the author may not have intended to support it.
getenv_setargv
void getenv_setargv(const(char)* envvalue, Strings* args)

Parses an environment variable containing command-line flags and append them to args.

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

DMD's entry point, C main.

parseCommandLine
bool parseCommandLine(Strings arguments, size_t argc, Param params, Strings files)

Parse command line arguments.

parse_arch_arg
const(char)* parse_arch_arg(Strings* args, const(char)* arch)

Parse command line arguments for the last instance of -m32, -m64 or -m32mscoff to detect the desired architecture.

parse_conf_arg
const(char)[] parse_conf_arg(Strings* args)

Parse command line arguments for the last instance of -conf=path.

printGlobalConfigs
void printGlobalConfigs(FILE* stream)
Undocumented in source. Be warned that the author may not have intended to support it.
printInternalFailure
void printInternalFailure(FILE* stream)

Print DMD's logo with more debug information and error-reporting pointers.

setTarget
void setTarget(Param params)

Set the is target fields of params according to the TARGET value.

Static variables

rt_options
string[] rt_options;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta