summaryrefslogtreecommitdiff
path: root/gcc/d/lang.opt
blob: b4b81523c14f3856daf16fa3db195a9433b83355 (plain)
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
; lang.opt -- Options for the D front end.
; Copyright (C) 2006-2022 Free Software Foundation, Inc.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 3, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING3.  If not see
; <http://www.gnu.org/licenses/>.

; See the GCC internals manual for a description of this file's format.

; Please try to keep this file in ASCII collating order.

Language
D

-dependencies
D Alias(M)
; Documented in C

-print-missing-file-dependencies
D Alias(MG)
; Documented in C

-user-dependencies
D Alias(MM)
; Documented in C

-write-dependencies
D NoDriverArg Separate Alias(MD)
; Documented in C

-write-user-dependencies
D NoDriverArg Separate Alias(MMD)
; Documented in C

H
D
; Different from documented use in C.

Hd
D Joined Separate
-Hd <dir>	Write D interface files to directory <dir>.

Hf
D Joined Separate
-Hf <file>	Write D interface to <file>.

I
D Joined Separate
; Documented in C

J
D Joined Separate
; Different from documented use in Fortran.

M
D
; Documented in C

MD
D Separate NoDriverArg
; Documented in C

MF
D Joined Separate
; Documented in C

MG
D
; Documented in C

MM
D
; Documented in C

MMD
D Separate NoDriverArg
; Documented in C

MP
D
; Documented in C

MT
D Joined Separate
; Documented in C

MQ
D Joined Separate
; Documented in C

Waddress
D Warning Var(warn_address) LangEnabledBy(D, Wextra)
; Documented in C

Wall
D
; Documented in C

Walloca
D
; Documented in C

Walloca-larger-than=
D
; Documented in C

Wno-alloca-larger-than
D
; Documented in C

Wcast-result
D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra)
Warn about casts that will produce a null result.

Wdeprecated
D
; Documented in common.opt

Werror
D
; Documented in common.opt

Wpsabi
D
; Documented in C

Wspeculative
D
Warn from speculative compiles such as __traits(compiles).

Wunknown-pragmas
D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
; Documented in C

Wvarargs
D
; Documented in C

X
D
Generate JSON file.

Xf
D Joined Separate
-Xf <file>	Write JSON output to the given <file>.

debuglib=
Driver Joined
Debug library to use instead of phobos.

defaultlib=
Driver Joined
Default library to use instead of phobos.

dstartfiles
Driver
Do link the standard D startup files in the compilation.

-verbose
D Alias(v)

fall-instantiations
D
Generate code for all template instantiations.

fassert
D Var(flag_assert)
Generate code for assert contracts.

fbounds-check
D
; Documented in common.opt

fbounds-check=
D Joined RejectNegative Enum(bounds_check) Var(flag_bounds_check)
-fbounds-check=[on|safeonly|off]	Turn array bounds checks on, in @safe code only, or off.

Enum
Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)

EnumValue
Enum(bounds_check) String(off) Value(0)

EnumValue
Enum(bounds_check) String(safeonly) Value(1)

EnumValue
Enum(bounds_check) String(on) Value(2)

; Generates a secondary ModuleInfo symbol for linking in unittests
fbuilding-libphobos-tests
D Undocumented Var(flag_building_libphobos_tests)

fbuiltin
D Var(flag_no_builtin, 0)
; Documented in C

fcheck=assert
D Alias(fassert)

fcheck=bounds
D Alias(fbounds-check)

fcheck=in
D Alias(fpreconditions)

fcheck=invariant
D Alias(finvariants)

fcheck=out
D Alias(fpostconditions)

fcheck=switch
D Alias(fswitch-errors)

fcheckaction=
D Joined RejectNegative Enum(check_action) Var(flag_check_action)
-fcheckaction=[throw,halt,context]	Behavior on contract failure.

Enum
Name(check_action) Type(int) UnknownError(unknown checkaction setting %qs)

EnumValue
Enum(check_action) String(throw) Value(0)

EnumValue
Enum(check_action) String(halt) Value(1)

EnumValue
Enum(check_action) String(context) Value(2)

fdebug
D
Compile in debug code.

fdebug=
D Joined RejectNegative
-fdebug=<level|ident>	Compile in debug code, code <= <level>, or code identified by <ident>.

fdoc
D
Generate documentation.

fdoc-dir=
D Joined RejectNegative
-fdoc-dir=<dir>	Write documentation file to directory <dir>.

fdoc-file=
D Joined RejectNegative
-fdoc-file=<file>	Write documentation to <file>.

fdoc-inc=
D Joined RejectNegative
-fdoc-inc=<file>	Include a Ddoc macro <file>.

fdruntime
D
Assume that standard D runtime libraries and \"D main\" exist.

fdump-c++-spec-verbose
D RejectNegative
Add comments for ignored declarations in the generated C++ header.

fdump-c++-spec=
D RejectNegative Joined
-fdump-cxx-spec=<filename>	Write all declarations as C++ code to <filename>.

fdump-d-original
D
Display the frontend AST after parsing and semantic passes.

fextern-std=
D Joined RejectNegative Enum(extern_stdcpp) Var(flag_extern_stdcpp)
-fextern-std=<standard>	Set C++ name mangling compatibility with <standard>.

Enum
Name(extern_stdcpp) Type(int) UnknownError(unknown C++ standard %qs)

EnumValue
Enum(extern_stdcpp) String(c++98) Value(199711)

EnumValue
Enum(extern_stdcpp) String(c++03) Value(199711)

EnumValue
Enum(extern_stdcpp) String(c++11) Value(201103)

EnumValue
Enum(extern_stdcpp) String(c++14) Value(201402)

EnumValue
Enum(extern_stdcpp) String(c++17) Value(201703)

EnumValue
Enum(extern_stdcpp) String(c++20) Value(202002)

fignore-unknown-pragmas
D
Ignore unsupported pragmas.

finvariants
D Var(flag_invariants)
Generate code for class invariant contracts.

fmain
D RejectNegative
Generate a default D main() function when compiling.

fmodule-file=
D Joined RejectNegative
-fmodule-file=<package.module>=<filespec>	use <filespec> as source file for <package.module>.

fmoduleinfo
D Var(flag_moduleinfo)
Generate ModuleInfo struct for output module.

fonly=
D Joined RejectNegative
Process all modules specified on the command line, but only generate code for the module specified by the argument.

fpostconditions
D Var(flag_postconditions)
Generate code for postcondition contracts.

fpreconditions
D Var(flag_preconditions)
Generate code for precondition contracts.

fpreview=all
D RejectNegative
Turn on all upcoming D language features.

fpreview=dip1000
D RejectNegative
Implement DIP1000: Scoped pointers.

fpreview=dip1008
D RejectNegative
Implement DIP1008: Allow exceptions in @nogc code.

fpreview=dip1021
D RejectNegative
Implement DIP1021: Mutable function arguments.

fpreview=dip25
D RejectNegative
Implement DIP25: Sealed references.

fpreview=dtorfields
D RejectNegative
Destruct fields of partially constructed objects.

fpreview=fieldwise
D RejectNegative
Use field-wise comparisons for struct equality.

fpreview=fixaliasthis
D RejectNegative
When a symbol is resolved, check `alias this' scope before going to upper scopes.

fpreview=in
D RejectNegative
Implement 'in' parameters to mean scope const.

fpreview=inclusiveincontracts
D RejectNegative
Implement 'in' contracts of overridden methods to be a superset of parent contract.

fpreview=nosharedaccess
D RejectNegative
Disable access to shared memory objects.

fpreview=rvaluerefparam
D RejectNegative
Enable rvalue arguments to ref parameters.

fpreview=shortenedmethods
D RejectNegative
Allow use of '=>' for methods and top-level functions in addition to lambdas.

frelease
D
Compile release version.

frevert=all
D RejectNegative
Turn off all revertable D language features.

frevert=dip1000
D RejectNegative
Revert DIP1000: Scoped pointers.

frevert=dip25
D RejectNegative
Revert DIP25: Sealed references.

frevert=dtorfields
D RejectNegative
Don't destruct fields of partially constructed objects.

frevert=intpromote
D RejectNegative
Use C-style integral promotion for unary '+', '-' and '~'.

frevert=markdown
D RejectNegative
Disable Markdown replacements in Ddoc.

frtti
D
; Documented in C

fsave-mixins=
D Joined RejectNegative
-fsave-mixins=<filename>	Expand and save mixins to file specified by <filename>.

fswitch-errors
D Var(flag_switch_errors)
Generate code for switches without a default case.

ftransition=all
D RejectNegative
List information on all D language transitions.

ftransition=field
D RejectNegative
List all non-mutable fields which occupy an object instance.

ftransition=in
D RejectNegative
List all usages of 'in' on parameter.

ftransition=nogc
D RejectNegative
List all hidden GC allocations.

ftransition=templates
D RejectNegative
List statistics on template instantiations.

ftransition=tls
D RejectNegative
List all variables going into thread local storage.

ftransition=vmarkdown
D RejectNegative
List instances of Markdown replacements in Ddoc.

funittest
D
Compile in unittest code.

fversion=
D Joined RejectNegative
-fversion=<level|ident>	Compile in version code >= <level> or identified by <ident>.

fweak-templates
D Var(flag_weak_templates) Init(1)
Emit template instantiations as weak symbols.

imultilib
D Joined Separate
; Documented in C

iprefix
D Joined Separate
; Documented in C

isysroot
D Joined Separate
; Documented in C

isystem
D Joined Separate
; Documented in C

nophoboslib
Driver
Do not link the standard D library in the compilation.

nostdinc
D
; Documented in C

static-libphobos
Driver
Link the standard D library statically in the compilation.

shared-libphobos
Driver
Link the standard D library dynamically in the compilation.

v
D
; Documented in C