View source code
Display the source code in dmd/cli.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aGitHub 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 usinglocal 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", "perform code coverage and generate `.lst` file", 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=<ident>", "compile in debug code identified by <ident>", TargetOS .all, true), Option("debuglib=<libname>", "set symbolic debug library to <libname>", TargetOS .all, true), Option("defaultlib=<libname>", "set default library to <libname>", 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=[none|defaultLibsOnly|externalOnly|all]", "Windows only: select symbols to dllimport", TargetOS .all, true), Option("edition[=<NNNN>[<filename>]]", "set language edition to year <NNNN>, apply to <filename>", 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("ftime-trace", "turn on compile time profiler, generate JSON file with results", TargetOS .all, true), Option("ftime-trace-granularity=<\xce\xbcsecs>", "Minimum time granularity (in microseconds) traced by time profiler (default: 500)", TargetOS .all, true), Option("ftime-trace-file=<filename>", "specify output file for `-ftime-trace`", TargetOS .all, true), Option("g", "add symbolic debug info", TargetOS .all, true), Option("gdwarf=<version>", "add DWARF symbolic debug info (default: 3)", 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]", "write C++ 'header' equivalent to stdout", TargetOS .all, true), Option("HC=[?|h|help]", "list available options 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> instead of stdout", 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("extI=<directory>", "look for imports that are out of the currently compiling binary, used to set the module as DllImport", TargetOS .all, true), Option("i[=<pattern>]", "include imported modules in the compilation", TargetOS .all, true), Option("identifiers=[UAX31|c99|c11|all]", "Specify the non-ASCII tables for D identifiers", TargetOS .all, true), Option("identifiers-importc=[UAX31|c99|c11|all]", "Specify the non-ASCII tables for ImportC identifiers", 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("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=[baseline|avx|native]", "Set the target architecture for code generation", 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("nothrow-optimizations", "allow skipping destructors when an Error unwinds through a nothrow function", 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("oq", "Write object files with fully qualified file names", 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> <args>", "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|sarif]", "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/deprecation messages (0 means unlimited)", TargetOS .all, true), Option("verrors=[context|simple]", "set the verbosity of error messages", 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=<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=[default|hidden|public]", "default visibility of symbols", 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
License
Copyright © 1999-2026 by the D Language Foundation | Page generated by ddox.