.TH DMD 1 "2018-01-07" "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 Do not link .IP -color Turn colored console output on .IP -color=[on|off] Force colored console output on or off .IP -conf=\fIfilename\fR Use config file at \fIfilename\fR .IP -cov Do code coverage analysis .IP -cov=\fInnn\fR Require at least nnn% code coverage .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 .IP -dw Show use of deprecated features as warnings (default) .IP -de Show use of deprecated features as errors (halt compilation) .IP -debug Compile in debug code .IP -debug=\fIlevel\fR Compile in debug code <= \fIlevel\fR .IP -debug=\fIident\fR Compile in debug code identified by \fIident\fR .IP -debuglib=\fIname\fR Set symbolic debug library to \fIname\fR .IP -defaultlib=\fIname\fR Set default library to \fIname\fR .IP -deps Print module dependencies (imports/file/version/debug/lib) .IP -deps=\fIfilename\fR Write module dependencies to \fIfilename\fR (only imports) .IP -fPIC Generate position independent code .IP -dip25 Implement http://wiki.dlang.org/DIP25 .IP -dip1000 Implement https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md .IP -dip1008 Implement https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md .IP -g Add symbolic debug info .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 --help Print help and exit .IP -I=\fIdirectory\fR Look for imports also in \fIdirectory\fR .IP -ignore Ignore unsupported pragmas .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 -m32 Generate 32 bit code .IP -m64 Generate 64 bit code .IP -main Add default main() (e.g. for unittesting) .IP -man Open web browser on manual page .IP -map Generate linker .map file .IP -mcpu=\fIid\fR Generate instructions for architecture identified by \fIid\fR .IP -mcpu=? List all architecture options .IP -mv=\fIpackage.module\fR= Use as source file for \fIpackage.module\fR .IP -noboundscheck No array bounds checking (deprecated, use -boundscheck=off) .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 -profile Profile runtime performance of generated code .IP -profile=gc Profile runtime allocations .IP -release Compile release version .IP -shared Generate shared library (DLL) .IP -transition=\fIid\fR Help with language change identified by \fIid\fR .IP -transition=? List all language changes .IP -unittest Compile in unit tests .IP -v Verbose .IP -vcolumns Print character (column) numbers in diagnostics .IP -verrors=\fInum\fR Limit the number of error messages (0 means unlimited) .IP -verrors=spec Show errors from speculative compiles such as __traits(compiles,...) .IP -vgc List all gc allocations including hidden ones .IP -vtls List all variables going into thread local storage .IP --version Print compiler version and exit .IP -version=\fIlevel\fR Compile in version code >= \fIlevel\fR .IP -version=\fIident\fR Compile in version code identified by \fIident\fR .IP -w Warnings as errors (compilation will halt) .IP -wi Warnings as messages (compilation will continue) .IP -X Generate JSON file .IP -Xf=\fIfilename\fR Write JSON file to \fIfilename\fR .SH LINKING Linking is done directly by the .B dmd compiler after a successful compile. To prevent .B dmd from running the linker, use the .B -c switch. .PP The actual linking is done by running \fBgcc\fR. This ensures compatibility with modules compiled with \fBgcc\fR. .SH FILES .I /etc/dmd.conf dmd will look for the initialization file .I dmd.conf in the directory \fI/etc\fR. If found, environment variable settings in the file will override any existing settings. .SH ENVIRONMENT The D compiler dmd uses the following environment variables: .IP DFLAGS 10 The value of .B DFLAGS is treated as if it were appended on the command line to \fBdmd\fR. .SH AUTHOR Copyright (c) 1999-2018 by The D Language Foundation written by Walter Bright .SH "ONLINE DOCUMENTATION" .UR https://dlang.org/dmd.html https://dlang.org/dmd.html .UE .SH "SEE ALSO" .BR dmd.conf (5) .BR rdmd (1) .BR dumpobj (1) .BR obj2asm (1) .BR gcc (1)