]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/d/lang.opt
Update copyright years.
[thirdparty/gcc.git] / gcc / d / lang.opt
CommitLineData
b4c522fa 1; lang.opt -- Options for the D front end.
7adcbafe 2; Copyright (C) 2006-2022 Free Software Foundation, Inc.
b4c522fa
IB
3;
4; GCC is free software; you can redistribute it and/or modify it under
5; the terms of the GNU General Public License as published by the Free
6; Software Foundation; either version 3, or (at your option) any later
7; version.
8;
9; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
10; WARRANTY; without even the implied warranty of MERCHANTABILITY or
11; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12; for more details.
13;
14; You should have received a copy of the GNU General Public License
15; along with GCC; see the file COPYING3. If not see
16; <http://www.gnu.org/licenses/>.
17
18; See the GCC internals manual for a description of this file's format.
19
20; Please try to keep this file in ASCII collating order.
21
22Language
23D
24
25-dependencies
26D Alias(M)
27; Documented in C
28
29-print-missing-file-dependencies
30D Alias(MG)
31; Documented in C
32
33-user-dependencies
34D Alias(MM)
35; Documented in C
36
37-write-dependencies
38D NoDriverArg Separate Alias(MD)
39; Documented in C
40
41-write-user-dependencies
42D NoDriverArg Separate Alias(MMD)
43; Documented in C
44
45H
46D
47; Different from documented use in C.
48
49Hd
50D Joined Separate
51-Hd <dir> Write D interface files to directory <dir>.
52
53Hf
54D Joined Separate
55-Hf <file> Write D interface to <file>.
56
57I
58D Joined Separate
59; Documented in C
60
61J
62D Joined Separate
63; Different from documented use in Fortran.
64
65M
66D
67; Documented in C
68
69MD
70D Separate NoDriverArg
71; Documented in C
72
73MF
74D Joined Separate
75; Documented in C
76
77MG
78D
79; Documented in C
80
81MM
82D
83; Documented in C
84
85MMD
86D Separate NoDriverArg
87; Documented in C
88
89MP
90D
91; Documented in C
92
93MT
94D Joined Separate
95; Documented in C
96
97MQ
98D Joined Separate
99; Documented in C
100
101Waddress
ead85749 102D Warning Var(warn_address) LangEnabledBy(D, Wextra)
b4c522fa
IB
103; Documented in C
104
105Wall
106D
107; Documented in C
108
109Walloca
110D
111; Documented in C
112
113Walloca-larger-than=
114D
115; Documented in C
116
117Wno-alloca-larger-than
118D
119; Documented in C
120
121Wcast-result
ead85749 122D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra)
b4c522fa
IB
123Warn about casts that will produce a null result.
124
125Wdeprecated
126D
99063eee 127; Documented in common.opt
b4c522fa
IB
128
129Werror
130D
131; Documented in common.opt
132
5de9d931
JJ
133Wpsabi
134D
135; Documented in C
136
b4c522fa
IB
137Wspeculative
138D
139Warn from speculative compiles such as __traits(compiles).
140
141Wtemplates
142D
143; Documented in C
144
145Wunknown-pragmas
ead85749 146D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
b4c522fa
IB
147; Documented in C
148
873b45d3
IB
149Wvarargs
150D
151; Documented in C
152
b4c522fa
IB
153X
154D
155Generate JSON file.
156
157Xf
158D Joined Separate
159-Xf <file> Write JSON output to the given <file>.
160
161debuglib=
162Driver Joined
163Debug library to use instead of phobos.
164
165defaultlib=
166Driver Joined
167Default library to use instead of phobos.
168
0b6e3127
RO
169dstartfiles
170Driver
171Do link the standard D startup files in the compilation.
172
b4c522fa
IB
173-verbose
174D Alias(v)
175
176fall-instantiations
177D
178Generate code for all template instantiations.
179
180fassert
181D Var(flag_assert)
182Generate code for assert contracts.
183
184fbounds-check
185D
186; Documented in common.opt
187
188fbounds-check=
189D Joined RejectNegative Enum(bounds_check) Var(flag_bounds_check)
190-fbounds-check=[on|safeonly|off] Turn array bounds checks on, in @safe code only, or off.
191
192Enum
193Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)
194
195EnumValue
196Enum(bounds_check) String(off) Value(0)
197
198EnumValue
199Enum(bounds_check) String(safeonly) Value(1)
200
201EnumValue
202Enum(bounds_check) String(on) Value(2)
203
c50eadba
IB
204; Generates a secondary ModuleInfo symbol for linking in unittests
205fbuilding-libphobos-tests
206D Undocumented Var(flag_building_libphobos_tests)
207
b4c522fa
IB
208fbuiltin
209D Var(flag_no_builtin, 0)
210; Documented in C
211
5fee5ec3
IB
212fcheck=assert
213D Alias(fassert)
214
215fcheck=bounds
216D Alias(fbounds-check)
217
218fcheck=in
219D Alias(fpreconditions)
220
221fcheck=invariant
222D Alias(finvariants)
223
224fcheck=out
225D Alias(fpostconditions)
226
227fcheck=switch
228D Alias(fswitch-errors)
229
230fcheckaction=
231D Joined RejectNegative Enum(check_action) Var(flag_check_action)
232-fcheckaction=[throw,halt,context] Behavior on contract failure.
233
234Enum
235Name(check_action) Type(int) UnknownError(unknown checkaction setting %qs)
236
237EnumValue
238Enum(check_action) String(throw) Value(0)
239
240EnumValue
241Enum(check_action) String(halt) Value(1)
242
243EnumValue
244Enum(check_action) String(context) Value(2)
245
b4c522fa
IB
246fdebug
247D
248Compile in debug code.
249
250fdebug=
251D Joined RejectNegative
252-fdebug=<level|ident> Compile in debug code, code <= <level>, or code identified by <ident>.
253
254fdoc
255D
256Generate documentation.
257
258fdoc-dir=
259D Joined RejectNegative
260-fdoc-dir=<dir> Write documentation file to directory <dir>.
261
262fdoc-file=
263D Joined RejectNegative
264-fdoc-file=<file> Write documentation to <file>.
265
266fdoc-inc=
267D Joined RejectNegative
268-fdoc-inc=<file> Include a Ddoc macro <file>.
269
c0aebc60
IB
270fdruntime
271D
272Assume that standard D runtime libraries and \"D main\" exist.
273
5fee5ec3
IB
274fdump-c++-spec-verbose
275D RejectNegative
276Add comments for ignored declarations in the generated C++ header.
277
278fdump-c++-spec=
279D RejectNegative Joined
280-fdump-cxx-spec=<filename> Write all declarations as C++ code to <file>.
281
b4c522fa
IB
282fdump-d-original
283D
284Display the frontend AST after parsing and semantic passes.
285
5fee5ec3
IB
286fextern-std=
287D Joined RejectNegative Enum(extern_stdcpp) Var(flag_extern_stdcpp)
288-fextern-std=<standard> Set C++ name mangling compatibility with <standard>.
289
290Enum
291Name(extern_stdcpp) Type(int) UnknownError(unknown C++ standard %qs)
292
293EnumValue
294Enum(extern_stdcpp) String(c++98) Value(199711)
295
296EnumValue
297Enum(extern_stdcpp) String(c++03) Value(199711)
298
299EnumValue
300Enum(extern_stdcpp) String(c++11) Value(201103)
301
302EnumValue
303Enum(extern_stdcpp) String(c++14) Value(201402)
304
305EnumValue
306Enum(extern_stdcpp) String(c++17) Value(201703)
307
308EnumValue
309Enum(extern_stdcpp) String(c++20) Value(202002)
310
b4c522fa
IB
311fignore-unknown-pragmas
312D
313Ignore unsupported pragmas.
314
315finvariants
316D Var(flag_invariants)
317Generate code for class invariant contracts.
318
319fmain
320D RejectNegative
321Generate a default D main() function when compiling.
322
323fmodule-file=
324D Joined RejectNegative
325-fmodule-file=<package.module>=<filespec> use <filespec> as source file for <package.module>.
326
327fmoduleinfo
c0aebc60 328D Var(flag_moduleinfo)
b4c522fa
IB
329Generate ModuleInfo struct for output module.
330
331fonly=
332D Joined RejectNegative
333Process all modules specified on the command line, but only generate code for the module specified by the argument.
334
335fpostconditions
336D Var(flag_postconditions)
337Generate code for postcondition contracts.
338
339fpreconditions
340D Var(flag_preconditions)
341Generate code for precondition contracts.
342
5fee5ec3
IB
343fpreview=all
344D RejectNegative
345Turn on all upcoming D language features.
346
347fpreview=dip1000
348D RejectNegative
349Implement DIP1000: Scoped pointers.
350
351fpreview=dip1008
352D RejectNegative
353Implement DIP1008: Allow exceptions in @nogc code.
354
355fpreview=dip1021
356D RejectNegative
357Implement DIP1021: Mutable function arguments.
358
359fpreview=dip25
360D RejectNegative
361Implement DIP25: Sealed references.
362
363fpreview=dtorfields
364D RejectNegative
365Destruct fields of partially constructed objects.
366
367fpreview=fieldwise
368D RejectNegative
369Use field-wise comparisons for struct equality.
370
371fpreview=fixaliasthis
372D RejectNegative
373When a symbol is resolved, check alias this scope before going to upper scopes.
374
375fpreview=in
376D RejectNegative
377Implement 'in' parameters to mean scope const.
378
379fpreview=inclusiveincontracts
380D RejectNegative
381Implement 'in' contracts of overridden methods to be a superset of parent contract.
382
5fee5ec3
IB
383fpreview=nosharedaccess
384D RejectNegative
385Disable access to shared memory objects.
386
387fpreview=rvaluerefparam
388D RejectNegative
389Enable rvalue arguments to ref parameters.
390
391fpreview=shortenedmethods
392D RejectNegative
393Allow use of '=>' for methods and top-level functions in addition to lambdas.
394
b4c522fa
IB
395frelease
396D
397Compile release version.
398
5fee5ec3
IB
399frevert=all
400D RejectNegative
401Turn off all revertable D language features.
402
403frevert=dip25
404D RejectNegative
405Revert DIP25: Sealed references.
406
407frevert=dtorfields
408D RejectNegative
409Don't destruct fields of partially constructed objects.
410
9c7d5e88
IB
411frevert=intpromote
412D RejectNegative
413Use C-style integral promotion for unary '+', '-' and '~'.
414
5fee5ec3
IB
415frevert=markdown
416D RejectNegative
417Disable Markdown replacements in Ddoc.
418
c0aebc60
IB
419frtti
420D
421; Documented in C
422
5fee5ec3
IB
423fsave-mixins=
424D Joined RejectNegative
425-fsave-mixins=<filename> Expand and save mixins to file specified by <filename>.
426
b4c522fa
IB
427fswitch-errors
428D Var(flag_switch_errors)
429Generate code for switches without a default case.
430
431ftransition=all
432D RejectNegative
5fee5ec3 433List information on all D language transitions.
b4c522fa
IB
434
435ftransition=field
436D RejectNegative
437List all non-mutable fields which occupy an object instance.
438
0fb57034
IB
439ftransition=in
440D RejectNegative
441List all usages of 'in' on parameter.
442
b4c522fa
IB
443ftransition=nogc
444D RejectNegative
445List all hidden GC allocations.
446
5fee5ec3
IB
447ftransition=templates
448D RejectNegative
449List statistics on template instantiations.
450
b4c522fa
IB
451ftransition=tls
452D RejectNegative
453List all variables going into thread local storage.
454
5fee5ec3
IB
455ftransition=vmarkdown
456D RejectNegative
457List instances of Markdown replacements in Ddoc.
458
b4c522fa
IB
459funittest
460D
461Compile in unittest code.
462
463fversion=
464D Joined RejectNegative
465-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>.
466
76a7e7e7
IB
467fweak-templates
468D Var(flag_weak_templates) Init(1)
469Emit template instantiations as weak symbols.
b4c522fa
IB
470
471imultilib
472D Joined Separate
473; Documented in C
474
475iprefix
476D Joined Separate
477; Documented in C
478
479isysroot
480D Joined Separate
481; Documented in C
482
483isystem
484D Joined Separate
485; Documented in C
486
487nophoboslib
488Driver
489Do not link the standard D library in the compilation.
490
491nostdinc
492D
493; Documented in C
494
495static-libphobos
496Driver
497Link the standard D library statically in the compilation.
498
499shared-libphobos
500Driver
501Link the standard D library dynamically in the compilation.
502
503v
504D
505; Documented in C