dmd.mars

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

Members

Functions

createModules
Modules createModules(Strings files, Strings libmodules, Target target)

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)

getenv_setargv
void getenv_setargv(const(char)* envvalue, Strings* args)

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

logo
void logo()

Print DMD's logo on stdout

moduleWithEmptyMain
Module moduleWithEmptyMain()
parseCommandLine
bool parseCommandLine(Strings arguments, size_t argc, Param params, Strings files, Target target)

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, -m32mscoff or -m32omfobj 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.

printInternalFailure
void printInternalFailure(FILE* stream)

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

setDefaultLibrary
void setDefaultLibrary(Param params, Target target)

Set the default and debug libraries to link against, if not already set

usage
void usage()

Print DMD's usage message on stdout

Meta