.TH DMD 1 "2026-08-30" "The D Language Foundation" "The D Language Foundation" .SH NAME dmd \- Digital Mars D2.x Compiler .SH SYNOPSIS .B dmd \fIfiles\fR ... [ \fI-switch\fR ... ] .SH DESCRIPTION .B dmd Compiles source code written in the D programming language. .SH OPTIONS .IP "file, file.d, file.htm, file.html" D source files to compile .IP file.di D interface files .IP file.o Object files to link in .IP file.a Library files to link in .IP @cmdfile A file to read more command-line arguments from, which may contain # single-line comments .IP -allinst Generate code for all template instantiations .IP -betterC Omit generating some runtime information and helper functions .IP -boundscheck=[on|safeonly|off] Bounds checks on, in @safe only, or off .IP -c Compile only, do not link .IP -check=[assert|bounds|in|invariant|out|switch][=[on|off]] Enable or disable specific checks .IP -check=[h|help|?] List information on all available checks .IP -checkaction=[D|C|halt|context] Behavior on assert/boundscheck/finalswitch failure .IP -checkaction=[h|help|?] List information on all available check actions .IP -color Turn colored console output on .IP -color=[on|off|auto] Force colored console output on or off, or only when not redirected (default) .IP -conf=\fIfilename\fR Use config file at \fIfilename\fR .IP -cov Perform code coverage and generate `.lst` file .IP -cov=ctfe Include code executed during CTFE in coverage report .IP -cov=\fInnn\fR Require at least \fInnn\fR% code coverage .IP -cpp=\fIfilename\fR Use \fIfilename\fR as the name of the C preprocessor to use for ImportC files .IP -D Generate documentation .IP -Dd\fIdirectory\fR Write documentation file to \fIdirectory\fR .IP -Df\fIfilename\fR Write documentation file to \fIfilename\fR .IP -d Silently allow deprecated features and symbols .IP -de Issue an error when deprecated features or symbols are used (halt compilation) .IP -dw Issue a message when deprecated features or symbols are used (default) .IP -debug Compile in debug code .IP -debug=\fIident\fR Compile in debug code identified by \fIident\fR .IP -debuglib=\fIlibname\fR Set symbolic debug library to \fIlibname\fR .IP -defaultlib=\fIlibname\fR Set default library to \fIlibname\fR .IP -deps Print module dependencies (imports/file/version/debug/lib) .IP -deps=\fIfilename\fR Write module dependencies to \fIfilename\fR (only imports) .IP -dllimport=[none|defaultLibsOnly|externalOnly|all] Windows only: select symbols to dllimport .IP -edition[=\fINNNN\fR[\fIfilename\fR]] Set language edition to year \fINNNN\fR, apply to \fIfilename\fR .IP -extern-std=\fIstandard\fR Set C++ name mangling compatibility with \fIstandard\fR .IP -extern-std=[h|help|?] List all supported standards .IP -fIBT Generate Indirect Branch Tracking code .IP -fPIC Generate position independent code .IP -fPIE Generate position independent executables .IP -ftime-trace Turn on compile time profiler, generate JSON file with results .IP -ftime-trace-granularity=\fIμsecs\fR Minimum time granularity (in microseconds) traced by time profiler (default: 500) .IP -ftime-trace-file=\fIfilename\fR Specify output file for `-ftime-trace` .IP -g Add symbolic debug info .IP -gdwarf=\fIversion\fR Add DWARF symbolic debug info (default: 3) .IP -gf Emit debug info for all referenced types .IP -gs Always emit stack frame .IP -gx Add stack stomp code .IP -H Generate 'header' file .IP -Hd=\fIdirectory\fR Write 'header' file to \fIdirectory\fR .IP -Hf=\fIfilename\fR Write 'header' file to \fIfilename\fR .IP -HC=[silent|verbose] Write C++ 'header' equivalent to stdout .IP -HC=[?|h|help] List available options for C++ 'header' file generation .IP -HCd=\fIdirectory\fR Write C++ 'header' file to \fIdirectory\fR .IP -HCf=\fIfilename\fR Write C++ 'header' file to \fIfilename\fR instead of stdout .IP --help Print help and exit .IP -I=\fIdirectory\fR Look for imports also in \fIdirectory\fR .IP -extI=\fIdirectory\fR Look for imports that are out of the currently compiling binary, used to set the module as DllImport .IP -i[=\fIpattern\fR] Include imported modules in the compilation .IP -identifiers=[UAX31|c99|c11|all] Specify the non-ASCII tables for D identifiers .IP -identifiers-importc=[UAX31|c99|c11|all] Specify the non-ASCII tables for ImportC identifiers .IP -ignore Deprecated flag, unsupported pragmas are always ignored now .IP -inline Do function inlining .IP -J=\fIdirectory\fR Look for string imports also in \fIdirectory\fR .IP -L=\fIlinkerflag\fR Pass \fIlinkerflag\fR to link .IP -lib Generate library rather than object files .IP -lowmem Enable garbage collection for the compiler .IP -m32 Generate 32 bit code .IP -m64 Generate 64 bit code .IP -main Add default main() if not present already (e.g. for unittesting) .IP -makedeps[=\fIfilename\fR] Print dependencies in Makefile compatible format to \fIfilename\fR or stdout. .IP -man Open web browser on manual page .IP -map Generate linker .map file .IP -mcpu=[baseline|avx|native] Set the target architecture for code generation .IP -mcpu=[h|help|?] List all architecture options .IP -mixin=\fIfilename\fR Expand and save mixins to file specified by \fIfilename\fR .IP -mv=\fIpackage.module\fR=\fIfilespec\fR Use \fIfilespec\fR as source file for \fIpackage.module\fR .IP -noboundscheck No array bounds checking (deprecated, use `-boundscheck=off`) .IP -nothrow Assume no Exceptions will be thrown .IP -nothrow-optimizations Allow skipping destructors when an Error unwinds through a nothrow function .IP -O Optimize .IP -o- Do not write object file .IP -od=\fIdirectory\fR Write object & library files to \fIdirectory\fR .IP -of=\fIfilename\fR Name output file to \fIfilename\fR .IP -op Preserve source path for output files .IP -oq Write object files with fully qualified file names .IP -os=\fIos\fR Sets target operating system to \fIos\fR .IP -P=\fIpreprocessorflag\fR Pass \fIpreprocessorflag\fR to C preprocessor .IP -preview=\fIname\fR Enable an upcoming language change identified by \fIname\fR .IP -preview=[h|help|?] List all upcoming language changes .IP -profile Profile runtime performance of generated code .IP -profile=gc Profile runtime allocations .IP -release Contracts and asserts are not emitted, and bounds checking is performed only in @safe functions .IP -revert=\fIname\fR Revert language change identified by \fIname\fR .IP -revert=[h|help|?] List all revertable language changes .IP -run \fIsrcfile\fR \fIargs\fR Compile, link, and run the program \fIsrcfile\fR .IP -shared Generate shared library (DLL) .IP -target=\fItriple\fR Use \fItriple\fR as \fIarch\fR-[\fIvendor\fR-]\fIos\fR[-\fIcenv\fR[-