-
-
Notifications
You must be signed in to change notification settings - Fork 594
/
dmd.1
257 lines (196 loc) · 4.35 KB
/
dmd.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
.TH DMD 1 "2009-07-27" "Digital Mars" "Digital Mars D"
.SH NAME
dmd \- Digital Mars D1.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 -unittest
Compile in unittest code
.IP -v
verbose
.IP -v1
Compile with D version 1
.IP -version=\fIlevel\fR
compile in version code >=
.I level
.IP -version=\fIident\fR
compile in version code identified by
.I ident
.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)