View source code
Display the source code in dmd/cli.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Variable dmd.cli.Usage.options

Returns all available CLI options

struct Usage
{
  // ...
  immutable(Usage.Option[]) options = [Option("allinst", "generate code for all template instantiations", TargetOS.all), Option("betterC", "omit generating some runtime information and helper functions", TargetOS.all), Option("boundscheck=[on|safeonly|off]", "bounds checks on, in @safe only, or off", TargetOS.all), Option("c", "compile only, do not link", TargetOS.all), Option("check=[assert|bounds|in|invariant|out|switch][=[on|off]]", "enable or disable specific checks", TargetOS.all), Option("check=[h|help|?]", "list information on all available checks", TargetOS.all), Option("checkaction=[D|C|halt|context]", "behavior on assert/boundscheck/finalswitch failure", TargetOS.all), Option("checkaction=[h|help|?]", "list information on all available check actions", TargetOS.all), Option("color", "turn colored console output on", TargetOS.all), Option("color=[on|off|auto]", "force colored console output on or off, or only when not redirected (default)", TargetOS.all), Option("conf=<filename>", "use config file at filename", TargetOS.all), Option("cov", "do code coverage analysis", TargetOS.all), Option("cov=ctfe", "Include code executed during CTFE in coverage report", TargetOS.all), Option("cov=<nnn>", "require at least nnn% code coverage", TargetOS.all), Option("D", "generate documentation", TargetOS.all), Option("Dd<directory>", "write documentation file to directory", TargetOS.all), Option("Df<filename>", "write documentation file to filename", TargetOS.all), Option("d", "silently allow deprecated features and symbols", TargetOS.all), Option("de", "issue an error when deprecated features or symbols are used (halt compilation)", TargetOS.all), Option("dw", "issue a message when deprecated features or symbols are used (default)", TargetOS.all), Option("debug", "compile in debug code", TargetOS.all), Option("debug=<level>", "compile in debug code <= level", TargetOS.all), Option("debug=<ident>", "compile in debug code identified by ident", TargetOS.all), Option("debuglib=<name>", "set symbolic debug library to name", TargetOS.all), Option("defaultlib=<name>", "set default library to name", TargetOS.all), Option("deps", "print module dependencies (imports/file/version/debug/lib)", TargetOS.all), Option("deps=<filename>", "write module dependencies to filename (only imports)", TargetOS.all), Option("extern-std=<standard>", "set C++ name mangling compatibility with <standard>", TargetOS.all), Option("extern-std=[h|help|?]", "list all supported standards", TargetOS.all), Option("fPIC", "generate position independent code", cast(TargetOS)cast(ubyte)121u), Option("fPIE", "generate position independent executables", cast(TargetOS)cast(ubyte)121u), Option("g", "add symbolic debug info", TargetOS.all), Option("gdwarf=<version>", "add DWARF symbolic debug info", TargetOS.Posix), Option("gf", "emit debug info for all referenced types", TargetOS.all), Option("gs", "always emit stack frame", TargetOS.all), Option("gx", "add stack stomp code", TargetOS.all), Option("H", "generate 'header' file", TargetOS.all), Option("Hd=<directory>", "write 'header' file to directory", TargetOS.all), Option("Hf=<filename>", "write 'header' file to filename", TargetOS.all), Option("HC[=[silent|verbose]]", "generate C++ 'header' file", TargetOS.all), Option("HC=[?|h|help]", "list available modes for C++ 'header' file generation", TargetOS.all), Option("HCd=<directory>", "write C++ 'header' file to directory", TargetOS.all), Option("HCf=<filename>", "write C++ 'header' file to filename", TargetOS.all), Option("-help", "print help and exit", TargetOS.all), Option("I=<directory>", "look for imports also in directory", TargetOS.all), Option("i[=<pattern>]", "include imported modules in the compilation", TargetOS.all), Option("ignore", "ignore unsupported pragmas", TargetOS.all), Option("inline", "do function inlining", TargetOS.all), Option("J=<directory>", "look for string imports also in directory", TargetOS.all), Option("L=<linkerflag>", "pass linkerflag to link", TargetOS.all), Option("lib", "generate library rather than object files", TargetOS.all), Option("lowmem", "enable garbage collection for the compiler", TargetOS.all), Option("m32", "generate 32 bit code", cast(TargetOS)cast(ubyte)63u), Option("m32mscoff", "generate 32 bit code and write MS-COFF object files (deprecated use -m32)", TargetOS.Windows), Option("m32omf", "(deprecated) generate 32 bit code and write OMF object files", TargetOS.Windows), Option("m64", "generate 64 bit code", TargetOS.all), Option("main", "add default main() if not present already (e.g. for unittesting)", TargetOS.all), Option("makedeps[=<filename>]", "print dependencies in Makefile compatible format to filename or stdout.", TargetOS.all), Option("man", "open web browser on manual page", TargetOS.all), Option("map", "generate linker .map file", TargetOS.all), Option("mcpu=<id>", "generate instructions for architecture identified by 'id'", TargetOS.all), Option("mcpu=[h|help|?]", "list all architecture options", TargetOS.all), Option("mixin=<filename>", "expand and save mixins to file specified by <filename>", TargetOS.all), Option("mscrtlib=<libname>", "MS C runtime library to reference from main/WinMain/DllMain", TargetOS.Windows), Option("mv=<package.module>=<filespec>", "use <filespec> as source file for <package.module>", TargetOS.all), Option("noboundscheck", "no array bounds checking (deprecated, use -boundscheck=off)", TargetOS.all), Option("O", "optimize", TargetOS.all), Option("o-", "do not write object file", TargetOS.all), Option("od=<directory>", "write object & library files to directory", TargetOS.all), Option("of=<filename>", "name output file to filename", TargetOS.all), Option("op", "preserve source path for output files", TargetOS.all), Option("os=<os>", "sets target operating system to <os>", TargetOS.all), Option("preview=<name>", "enable an upcoming language change identified by 'name'", TargetOS.all), Option("preview=[h|help|?]", "list all upcoming language changes", TargetOS.all), Option("profile", "profile runtime performance of generated code", TargetOS.all), Option("profile=gc", "profile runtime allocations", TargetOS.all), Option("release", "compile release version", TargetOS.all), Option("revert=<name>", "revert language change identified by 'name'", TargetOS.all), Option("revert=[h|help|?]", "list all revertable language changes", TargetOS.all), Option("run <srcfile>", "compile, link, and run the program srcfile", TargetOS.all), Option("shared", "generate shared library (DLL)", TargetOS.all), Option("target=<triple>", "use <triple> as <arch>-[<vendor>-]<os>[-<cenv>[-<cppenv]]", TargetOS.all), Option("transition=<name>", "help with language change identified by 'name'", TargetOS.all), Option("transition=[h|help|?]", "list all language changes", TargetOS.all), Option("unittest", "compile in unit tests", TargetOS.all), Option("v", "verbose", TargetOS.all), Option("vasm", "list generated assembler for each function", TargetOS.all), Option("vcolumns", "print character (column) numbers in diagnostics", TargetOS.all), Option("verror-style=[digitalmars|gnu]", "set the style for file/line number annotations on compiler messages", TargetOS.all), Option("verrors=<num>", "limit the number of error messages (0 means unlimited)", TargetOS.all), Option("verrors=context", "show error messages with the context of the erroring source line", TargetOS.all), Option("verrors=spec", "show errors from speculative compiles such as __traits(compiles,...)", TargetOS.all), Option("-version", "print compiler version and exit", TargetOS.all), Option("version=<level>", "compile in version code >= level", TargetOS.all), Option("version=<ident>", "compile in version code identified by ident", TargetOS.all), Option("vgc", "list all gc allocations including hidden ones", TargetOS.all), Option("vtls", "list all variables going into thread local storage", TargetOS.all), Option("vtemplates=[list-instances]", "list statistics on template instantiations", TargetOS.all), Option("w", "warnings as errors (compilation will halt)", TargetOS.all), Option("wi", "warnings as messages (compilation will continue)", TargetOS.all), Option("X", "generate JSON file", TargetOS.all), Option("Xf=<filename>", "write JSON file to filename", TargetOS.all), Option("Xcc=<driverflag>", "pass driverflag to linker driver (cc)", TargetOS.Posix)];
  // ...
}

Authors

Walter Bright

License

Boost License 1.0