rtl: ICE with thread_local and inline asm [PR104777]
[official-gcc.git] / gcc / d / lang.opt
blob491797a1b6b3004958166d1e8804f43b497a7b77
1 ; lang.opt -- Options for the D front end.
2 ; Copyright (C) 2006-2022 Free Software Foundation, Inc.
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.
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.
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/>.
18 ; See the GCC internals manual for a description of this file's format.
20 ; Please try to keep this file in ASCII collating order.
22 Language
25 -dependencies
26 D Alias(M)
27 ; Documented in C
29 -print-missing-file-dependencies
30 D Alias(MG)
31 ; Documented in C
33 -user-dependencies
34 D Alias(MM)
35 ; Documented in C
37 -write-dependencies
38 D NoDriverArg Separate Alias(MD)
39 ; Documented in C
41 -write-user-dependencies
42 D NoDriverArg Separate Alias(MMD)
43 ; Documented in C
47 ; Different from documented use in C.
50 D Joined Separate
51 -Hd <dir>       Write D interface files to directory <dir>.
54 D Joined Separate
55 -Hf <file>      Write D interface to <file>.
58 D Joined Separate
59 ; Documented in C
62 D Joined Separate
63 ; Different from documented use in Fortran.
67 ; Documented in C
70 D Separate NoDriverArg
71 ; Documented in C
74 D Joined Separate
75 ; Documented in C
79 ; Documented in C
83 ; Documented in C
85 MMD
86 D Separate NoDriverArg
87 ; Documented in C
91 ; Documented in C
94 D Joined Separate
95 ; Documented in C
98 D Joined Separate
99 ; Documented in C
101 Waddress
102 D Warning Var(warn_address) LangEnabledBy(D, Wextra)
103 ; Documented in C
105 Wall
107 ; Documented in C
109 Walloca
111 ; Documented in C
113 Walloca-larger-than=
115 ; Documented in C
117 Wno-alloca-larger-than
119 ; Documented in C
121 Wcast-result
122 D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra)
123 Warn about casts that will produce a null result.
125 Wdeprecated
127 ; Documented in common.opt
129 Werror
131 ; Documented in common.opt
133 Wpsabi
135 ; Documented in C
137 Wspeculative
139 Warn from speculative compiles such as __traits(compiles).
141 Wtemplates
143 ; Documented in C
145 Wunknown-pragmas
146 D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
147 ; Documented in C
149 Wvarargs
151 ; Documented in C
155 Generate JSON file.
158 D Joined Separate
159 -Xf <file>      Write JSON output to the given <file>.
161 debuglib=
162 Driver Joined
163 Debug library to use instead of phobos.
165 defaultlib=
166 Driver Joined
167 Default library to use instead of phobos.
169 dstartfiles
170 Driver
171 Do link the standard D startup files in the compilation.
173 -verbose
174 D Alias(v)
176 fall-instantiations
178 Generate code for all template instantiations.
180 fassert
181 D Var(flag_assert)
182 Generate code for assert contracts.
184 fbounds-check
186 ; Documented in common.opt
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.
192 Enum
193 Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)
195 EnumValue
196 Enum(bounds_check) String(off) Value(0)
198 EnumValue
199 Enum(bounds_check) String(safeonly) Value(1)
201 EnumValue
202 Enum(bounds_check) String(on) Value(2)
204 ; Generates a secondary ModuleInfo symbol for linking in unittests
205 fbuilding-libphobos-tests
206 D Undocumented Var(flag_building_libphobos_tests)
208 fbuiltin
209 D Var(flag_no_builtin, 0)
210 ; Documented in C
212 fcheck=assert
213 D Alias(fassert)
215 fcheck=bounds
216 D Alias(fbounds-check)
218 fcheck=in
219 D Alias(fpreconditions)
221 fcheck=invariant
222 D Alias(finvariants)
224 fcheck=out
225 D Alias(fpostconditions)
227 fcheck=switch
228 D Alias(fswitch-errors)
230 fcheckaction=
231 D Joined RejectNegative Enum(check_action) Var(flag_check_action)
232 -fcheckaction=[throw,halt,context]      Behavior on contract failure.
234 Enum
235 Name(check_action) Type(int) UnknownError(unknown checkaction setting %qs)
237 EnumValue
238 Enum(check_action) String(throw) Value(0)
240 EnumValue
241 Enum(check_action) String(halt) Value(1)
243 EnumValue
244 Enum(check_action) String(context) Value(2)
246 fdebug
248 Compile in debug code.
250 fdebug=
251 D Joined RejectNegative
252 -fdebug=<level|ident>   Compile in debug code, code <= <level>, or code identified by <ident>.
254 fdoc
256 Generate documentation.
258 fdoc-dir=
259 D Joined RejectNegative
260 -fdoc-dir=<dir> Write documentation file to directory <dir>.
262 fdoc-file=
263 D Joined RejectNegative
264 -fdoc-file=<file>       Write documentation to <file>.
266 fdoc-inc=
267 D Joined RejectNegative
268 -fdoc-inc=<file>        Include a Ddoc macro <file>.
270 fdruntime
272 Assume that standard D runtime libraries and \"D main\" exist.
274 fdump-c++-spec-verbose
275 D RejectNegative
276 Add comments for ignored declarations in the generated C++ header.
278 fdump-c++-spec=
279 D RejectNegative Joined
280 -fdump-cxx-spec=<filename>      Write all declarations as C++ code to <file>.
282 fdump-d-original
284 Display the frontend AST after parsing and semantic passes.
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>.
290 Enum
291 Name(extern_stdcpp) Type(int) UnknownError(unknown C++ standard %qs)
293 EnumValue
294 Enum(extern_stdcpp) String(c++98) Value(199711)
296 EnumValue
297 Enum(extern_stdcpp) String(c++03) Value(199711)
299 EnumValue
300 Enum(extern_stdcpp) String(c++11) Value(201103)
302 EnumValue
303 Enum(extern_stdcpp) String(c++14) Value(201402)
305 EnumValue
306 Enum(extern_stdcpp) String(c++17) Value(201703)
308 EnumValue
309 Enum(extern_stdcpp) String(c++20) Value(202002)
311 fignore-unknown-pragmas
313 Ignore unsupported pragmas.
315 finvariants
316 D Var(flag_invariants)
317 Generate code for class invariant contracts.
319 fmain
320 D RejectNegative
321 Generate a default D main() function when compiling.
323 fmodule-file=
324 D Joined RejectNegative
325 -fmodule-file=<package.module>=<filespec>       use <filespec> as source file for <package.module>.
327 fmoduleinfo
328 D Var(flag_moduleinfo)
329 Generate ModuleInfo struct for output module.
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.
335 fpostconditions
336 D Var(flag_postconditions)
337 Generate code for postcondition contracts.
339 fpreconditions
340 D Var(flag_preconditions)
341 Generate code for precondition contracts.
343 fpreview=all
344 D RejectNegative
345 Turn on all upcoming D language features.
347 fpreview=dip1000
348 D RejectNegative
349 Implement DIP1000: Scoped pointers.
351 fpreview=dip1008
352 D RejectNegative
353 Implement DIP1008: Allow exceptions in @nogc code.
355 fpreview=dip1021
356 D RejectNegative
357 Implement DIP1021: Mutable function arguments.
359 fpreview=dip25
360 D RejectNegative
361 Implement DIP25: Sealed references.
363 fpreview=dtorfields
364 D RejectNegative
365 Destruct fields of partially constructed objects.
367 fpreview=fieldwise
368 D RejectNegative
369 Use field-wise comparisons for struct equality.
371 fpreview=fixaliasthis
372 D RejectNegative
373 When a symbol is resolved, check alias this scope before going to upper scopes.
375 fpreview=in
376 D RejectNegative
377 Implement 'in' parameters to mean scope const.
379 fpreview=inclusiveincontracts
380 D RejectNegative
381 Implement 'in' contracts of overridden methods to be a superset of parent contract.
383 fpreview=nosharedaccess
384 D RejectNegative
385 Disable access to shared memory objects.
387 fpreview=rvaluerefparam
388 D RejectNegative
389 Enable rvalue arguments to ref parameters.
391 fpreview=shortenedmethods
392 D RejectNegative
393 Allow use of '=>' for methods and top-level functions in addition to lambdas.
395 frelease
397 Compile release version.
399 frevert=all
400 D RejectNegative
401 Turn off all revertable D language features.
403 frevert=dip25
404 D RejectNegative
405 Revert DIP25: Sealed references.
407 frevert=dtorfields
408 D RejectNegative
409 Don't destruct fields of partially constructed objects.
411 frevert=intpromote
412 D RejectNegative
413 Use C-style integral promotion for unary '+', '-' and '~'.
415 frevert=markdown
416 D RejectNegative
417 Disable Markdown replacements in Ddoc.
419 frtti
421 ; Documented in C
423 fsave-mixins=
424 D Joined RejectNegative
425 -fsave-mixins=<filename>        Expand and save mixins to file specified by <filename>.
427 fswitch-errors
428 D Var(flag_switch_errors)
429 Generate code for switches without a default case.
431 ftransition=all
432 D RejectNegative
433 List information on all D language transitions.
435 ftransition=field
436 D RejectNegative
437 List all non-mutable fields which occupy an object instance.
439 ftransition=in
440 D RejectNegative
441 List all usages of 'in' on parameter.
443 ftransition=nogc
444 D RejectNegative
445 List all hidden GC allocations.
447 ftransition=templates
448 D RejectNegative
449 List statistics on template instantiations.
451 ftransition=tls
452 D RejectNegative
453 List all variables going into thread local storage.
455 ftransition=vmarkdown
456 D RejectNegative
457 List instances of Markdown replacements in Ddoc.
459 funittest
461 Compile in unittest code.
463 fversion=
464 D Joined RejectNegative
465 -fversion=<level|ident> Compile in version code >= <level> or identified by <ident>.
467 fweak-templates
468 D Var(flag_weak_templates) Init(1)
469 Emit template instantiations as weak symbols.
471 imultilib
472 D Joined Separate
473 ; Documented in C
475 iprefix
476 D Joined Separate
477 ; Documented in C
479 isysroot
480 D Joined Separate
481 ; Documented in C
483 isystem
484 D Joined Separate
485 ; Documented in C
487 nophoboslib
488 Driver
489 Do not link the standard D library in the compilation.
491 nostdinc
493 ; Documented in C
495 static-libphobos
496 Driver
497 Link the standard D library statically in the compilation.
499 shared-libphobos
500 Driver
501 Link the standard D library dynamically in the compilation.
505 ; Documented in C