mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
260 lines
4.4 KiB
Groff
260 lines
4.4 KiB
Groff
.TH DMD 1 "2009-07-27" "Digital Mars" "Digital Mars D"
|
|
.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 -c
|
|
Compile only, do not link
|
|
|
|
.IP -cov
|
|
Include code coverage analysis
|
|
|
|
.IP -D
|
|
Generate documentation
|
|
|
|
.IP -Dd\fIdocdir\fR
|
|
Write documentation file to
|
|
.I docdir
|
|
directory
|
|
|
|
.IP -Df\fIfilename\fR
|
|
Write documentation file to
|
|
.I filename
|
|
|
|
.IP -d
|
|
Allow deprecated features.
|
|
|
|
.IP -debug
|
|
Compile in debug code
|
|
|
|
.IP -debug=\fIlevel\fR
|
|
Compile in debug code <=
|
|
.I level
|
|
|
|
.IP -debug=\fIident\fR
|
|
Compile in debug code identified by
|
|
.I ident
|
|
|
|
.IP -debuglib=\fIname\fR
|
|
Set the symbolic debug library to
|
|
.I name
|
|
|
|
.IP -defaultlib=\fIname\fR
|
|
Set the default library to
|
|
.I name
|
|
|
|
.IP -deps=\fIfilename\fR
|
|
Write module dependencies to
|
|
.I filename
|
|
|
|
.IP -fPIC
|
|
Generate position independent code.
|
|
|
|
.IP -g
|
|
Add symbolic debug info.
|
|
|
|
.IP -gc
|
|
Add symbolic debug info in C format (for older
|
|
\fBgdb\fR's.)
|
|
|
|
.IP -H
|
|
Generate D interface file.
|
|
|
|
.IP -Hd\fIdir\fR
|
|
Write D interface file to
|
|
.I dir
|
|
directory.
|
|
|
|
.IP -Hf\fIfilename\fR
|
|
Write D interface file to
|
|
.I filename
|
|
|
|
.IP --help
|
|
Print help
|
|
|
|
.IP -I\fIpath\fR
|
|
Where to look for imports.
|
|
.I path
|
|
is a : separated list of paths. Multiple
|
|
.B -I
|
|
s can be used, and the paths are searched in the same
|
|
order.
|
|
|
|
.IP -ignore
|
|
Ignore unsupported pragmas
|
|
|
|
.IP -inline
|
|
Inline expand functions
|
|
|
|
.IP -J\fIpath\fR
|
|
Where to look for string imports.
|
|
.I path
|
|
is a : separated list of paths. Multiple
|
|
.B -I
|
|
s can be used, and the paths are searched in the same
|
|
order.
|
|
|
|
.IP -L\fIlinkerflag\fR
|
|
Pass
|
|
.I linkerflag
|
|
to the linker, for example, -M
|
|
|
|
.IP -lib
|
|
Generate a library rather than object files
|
|
|
|
.IP -man
|
|
Open web browser on manual page
|
|
|
|
.IP -nofloat
|
|
Do not emit reference to floating point
|
|
|
|
.IP -O
|
|
Optimize
|
|
|
|
.IP -o-
|
|
Suppress generation of object file
|
|
|
|
.IP -od\fIobjdir\fR
|
|
write object files relative to directory
|
|
.I objdir
|
|
instead of the current directory
|
|
|
|
.IP -of\fIfilename\fR
|
|
set output file name to
|
|
.I filename
|
|
in the output directory
|
|
|
|
.IP -op
|
|
normally the path for
|
|
.B .d
|
|
source files is stripped off when generating an object file
|
|
name.
|
|
.B -op
|
|
will leave it on.
|
|
|
|
.IP -profile
|
|
Profile the runtime performance of the generated code
|
|
|
|
.IP -quiet
|
|
Suppress non-essential compiler messages
|
|
|
|
.IP -release
|
|
Compile release version
|
|
|
|
.IP "-run \fIsrcfile args...\fR"
|
|
Compile, link, and run the program
|
|
.I srcfile
|
|
with the rest of the command line, \fI args...\fR, as the
|
|
arguments to the program. No .o or executable file is left
|
|
behind.
|
|
|
|
.IP -safe
|
|
safe memory model
|
|
|
|
.IP -unittest
|
|
Compile in unittest code
|
|
|
|
.IP -v
|
|
verbose
|
|
|
|
.IP -version=\fIlevel\fR
|
|
compile in version code >=
|
|
.I level
|
|
|
|
.IP -version=\fIident\fR
|
|
compile in version code identified by
|
|
.I ident
|
|
|
|
.IP -vtls
|
|
List all variables poing into thread local storage
|
|
|
|
.IP -w
|
|
Enable warnings
|
|
|
|
.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 BUGS
|
|
.B -g
|
|
is only implemented for line numbers, not local symbols,
|
|
because I haven't figured out how to do it yet.
|
|
.B gdb
|
|
still works, though, at the global symbol level.
|
|
.PP
|
|
|
|
The code generator output has not been tuned yet, so it can
|
|
be bloated.
|
|
.PP
|
|
|
|
Shared libraries cannot be generated.
|
|
.PP
|
|
|
|
The exception handling is not compatible with the way
|
|
.B g++
|
|
does it. I don't know if this is an issue or not.
|
|
.PP
|
|
|
|
The compiler sometimes gets the line number wrong on an error.
|
|
|
|
.SH AUTHOR
|
|
Copyright (c) 1999-2009 by Digital Mars written by Walter Bright
|
|
|
|
.SH "ONLINE DOCUMENTATION"
|
|
.UR http://www.digitalmars.com/d/index.html
|
|
http://www.digitalmars.com/d/index.html
|
|
.UE
|
|
|
|
.SH "SEE ALSO"
|
|
.BR dmd.conf (5)
|
|
.BR rdmd (1)
|
|
.BR dumpobj (1)
|
|
.BR obj2asm (1)
|
|
.BR gcc (1)
|