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