Home | History | Annotate | Line # | Download | only in d
      1 ; lang.opt -- Options for the D front end.
      2 ; Copyright (C) 2006-2022 Free Software Foundation, Inc.
      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
    102 D Warning Var(warn_address) LangEnabledBy(D, Wextra)
    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
    122 D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra)
    123 Warn about casts that will produce a null result.
    124 
    125 Wdeprecated
    126 D
    127 ; Documented in common.opt
    128 
    129 Werror
    130 D
    131 ; Documented in common.opt
    132 
    133 Wpsabi
    134 D
    135 ; Documented in C
    136 
    137 Wspeculative
    138 D
    139 Warn from speculative compiles such as __traits(compiles).
    140 
    141 Wunknown-pragmas
    142 D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
    143 ; Documented in C
    144 
    145 Wvarargs
    146 D
    147 ; Documented in C
    148 
    149 X
    150 D
    151 Generate JSON file.
    152 
    153 Xf
    154 D Joined Separate
    155 -Xf <file>	Write JSON output to the given <file>.
    156 
    157 debuglib=
    158 Driver Joined
    159 Debug library to use instead of phobos.
    160 
    161 defaultlib=
    162 Driver Joined
    163 Default library to use instead of phobos.
    164 
    165 dstartfiles
    166 Driver
    167 Do link the standard D startup files in the compilation.
    168 
    169 -verbose
    170 D Alias(v)
    171 
    172 fall-instantiations
    173 D
    174 Generate code for all template instantiations.
    175 
    176 fassert
    177 D Var(flag_assert)
    178 Generate code for assert contracts.
    179 
    180 fbounds-check
    181 D
    182 ; Documented in common.opt
    183 
    184 fbounds-check=
    185 D Joined RejectNegative Enum(bounds_check) Var(flag_bounds_check)
    186 -fbounds-check=[on|safeonly|off]	Turn array bounds checks on, in @safe code only, or off.
    187 
    188 Enum
    189 Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)
    190 
    191 EnumValue
    192 Enum(bounds_check) String(off) Value(0)
    193 
    194 EnumValue
    195 Enum(bounds_check) String(safeonly) Value(1)
    196 
    197 EnumValue
    198 Enum(bounds_check) String(on) Value(2)
    199 
    200 ; Generates a secondary ModuleInfo symbol for linking in unittests
    201 fbuilding-libphobos-tests
    202 D Undocumented Var(flag_building_libphobos_tests)
    203 
    204 fbuiltin
    205 D Var(flag_no_builtin, 0)
    206 ; Documented in C
    207 
    208 fcheck=assert
    209 D Alias(fassert)
    210 
    211 fcheck=bounds
    212 D Alias(fbounds-check)
    213 
    214 fcheck=in
    215 D Alias(fpreconditions)
    216 
    217 fcheck=invariant
    218 D Alias(finvariants)
    219 
    220 fcheck=out
    221 D Alias(fpostconditions)
    222 
    223 fcheck=switch
    224 D Alias(fswitch-errors)
    225 
    226 fcheckaction=
    227 D Joined RejectNegative Enum(check_action) Var(flag_check_action)
    228 -fcheckaction=[throw,halt,context]	Behavior on contract failure.
    229 
    230 Enum
    231 Name(check_action) Type(int) UnknownError(unknown checkaction setting %qs)
    232 
    233 EnumValue
    234 Enum(check_action) String(throw) Value(0)
    235 
    236 EnumValue
    237 Enum(check_action) String(halt) Value(1)
    238 
    239 EnumValue
    240 Enum(check_action) String(context) Value(2)
    241 
    242 fdebug
    243 D
    244 Compile in debug code.
    245 
    246 fdebug=
    247 D Joined RejectNegative
    248 -fdebug=<level|ident>	Compile in debug code, code <= <level>, or code identified by <ident>.
    249 
    250 fdoc
    251 D
    252 Generate documentation.
    253 
    254 fdoc-dir=
    255 D Joined RejectNegative
    256 -fdoc-dir=<dir>	Write documentation file to directory <dir>.
    257 
    258 fdoc-file=
    259 D Joined RejectNegative
    260 -fdoc-file=<file>	Write documentation to <file>.
    261 
    262 fdoc-inc=
    263 D Joined RejectNegative
    264 -fdoc-inc=<file>	Include a Ddoc macro <file>.
    265 
    266 fdruntime
    267 D
    268 Assume that standard D runtime libraries and \"D main\" exist.
    269 
    270 fdump-c++-spec-verbose
    271 D RejectNegative
    272 Add comments for ignored declarations in the generated C++ header.
    273 
    274 fdump-c++-spec=
    275 D RejectNegative Joined
    276 -fdump-cxx-spec=<filename>	Write all declarations as C++ code to <filename>.
    277 
    278 fdump-d-original
    279 D
    280 Display the frontend AST after parsing and semantic passes.
    281 
    282 fextern-std=
    283 D Joined RejectNegative Enum(extern_stdcpp) Var(flag_extern_stdcpp)
    284 -fextern-std=<standard>	Set C++ name mangling compatibility with <standard>.
    285 
    286 Enum
    287 Name(extern_stdcpp) Type(int) UnknownError(unknown C++ standard %qs)
    288 
    289 EnumValue
    290 Enum(extern_stdcpp) String(c++98) Value(199711)
    291 
    292 EnumValue
    293 Enum(extern_stdcpp) String(c++03) Value(199711)
    294 
    295 EnumValue
    296 Enum(extern_stdcpp) String(c++11) Value(201103)
    297 
    298 EnumValue
    299 Enum(extern_stdcpp) String(c++14) Value(201402)
    300 
    301 EnumValue
    302 Enum(extern_stdcpp) String(c++17) Value(201703)
    303 
    304 EnumValue
    305 Enum(extern_stdcpp) String(c++20) Value(202002)
    306 
    307 fignore-unknown-pragmas
    308 D
    309 Ignore unsupported pragmas.
    310 
    311 finvariants
    312 D Var(flag_invariants)
    313 Generate code for class invariant contracts.
    314 
    315 fmain
    316 D RejectNegative
    317 Generate a default D main() function when compiling.
    318 
    319 fmodule-file=
    320 D Joined RejectNegative
    321 -fmodule-file=<package.module>=<filespec>	use <filespec> as source file for <package.module>.
    322 
    323 fmoduleinfo
    324 D Var(flag_moduleinfo)
    325 Generate ModuleInfo struct for output module.
    326 
    327 fonly=
    328 D Joined RejectNegative
    329 Process all modules specified on the command line, but only generate code for the module specified by the argument.
    330 
    331 fpostconditions
    332 D Var(flag_postconditions)
    333 Generate code for postcondition contracts.
    334 
    335 fpreconditions
    336 D Var(flag_preconditions)
    337 Generate code for precondition contracts.
    338 
    339 fpreview=all
    340 D RejectNegative
    341 Turn on all upcoming D language features.
    342 
    343 fpreview=dip1000
    344 D RejectNegative
    345 Implement DIP1000: Scoped pointers.
    346 
    347 fpreview=dip1008
    348 D RejectNegative
    349 Implement DIP1008: Allow exceptions in @nogc code.
    350 
    351 fpreview=dip1021
    352 D RejectNegative
    353 Implement DIP1021: Mutable function arguments.
    354 
    355 fpreview=dip25
    356 D RejectNegative
    357 Implement DIP25: Sealed references.
    358 
    359 fpreview=dtorfields
    360 D RejectNegative
    361 Destruct fields of partially constructed objects.
    362 
    363 fpreview=fieldwise
    364 D RejectNegative
    365 Use field-wise comparisons for struct equality.
    366 
    367 fpreview=fixaliasthis
    368 D RejectNegative
    369 When a symbol is resolved, check `alias this' scope before going to upper scopes.
    370 
    371 fpreview=in
    372 D RejectNegative
    373 Implement 'in' parameters to mean scope const.
    374 
    375 fpreview=inclusiveincontracts
    376 D RejectNegative
    377 Implement 'in' contracts of overridden methods to be a superset of parent contract.
    378 
    379 fpreview=nosharedaccess
    380 D RejectNegative
    381 Disable access to shared memory objects.
    382 
    383 fpreview=rvaluerefparam
    384 D RejectNegative
    385 Enable rvalue arguments to ref parameters.
    386 
    387 fpreview=shortenedmethods
    388 D RejectNegative
    389 Allow use of '=>' for methods and top-level functions in addition to lambdas.
    390 
    391 frelease
    392 D
    393 Compile release version.
    394 
    395 frevert=all
    396 D RejectNegative
    397 Turn off all revertable D language features.
    398 
    399 frevert=dip1000
    400 D RejectNegative
    401 Revert DIP1000: Scoped pointers.
    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 
    411 frevert=intpromote
    412 D RejectNegative
    413 Use C-style integral promotion for unary '+', '-' and '~'.
    414 
    415 frevert=markdown
    416 D RejectNegative
    417 Disable Markdown replacements in Ddoc.
    418 
    419 frtti
    420 D
    421 ; Documented in C
    422 
    423 fsave-mixins=
    424 D Joined RejectNegative
    425 -fsave-mixins=<filename>	Expand and save mixins to file specified by <filename>.
    426 
    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
    433 List information on all D language transitions.
    434 
    435 ftransition=field
    436 D RejectNegative
    437 List all non-mutable fields which occupy an object instance.
    438 
    439 ftransition=in
    440 D RejectNegative
    441 List all usages of 'in' on parameter.
    442 
    443 ftransition=nogc
    444 D RejectNegative
    445 List all hidden GC allocations.
    446 
    447 ftransition=templates
    448 D RejectNegative
    449 List statistics on template instantiations.
    450 
    451 ftransition=tls
    452 D RejectNegative
    453 List all variables going into thread local storage.
    454 
    455 ftransition=vmarkdown
    456 D RejectNegative
    457 List instances of Markdown replacements in Ddoc.
    458 
    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 
    467 fweak-templates
    468 D Var(flag_weak_templates) Init(1)
    469 Emit template instantiations as weak symbols.
    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
    506