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

Authors

Walter Bright

License

Boost License 1.0