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