1; lang.opt -- Options for the D front end. 2; Copyright (C) 2006-2020 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 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 102D Warning Var(warn_address) 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 122D Warning Var(warn_cast_result) 123Warn about casts that will produce a null result. 124 125Wdeprecated 126D 127; Documented in common.opt 128 129Werror 130D 131; Documented in common.opt 132 133Wpsabi 134D 135; Documented in C 136 137Wspeculative 138D 139Warn from speculative compiles such as __traits(compiles). 140 141Wtemplates 142D 143; Documented in C 144 145Wunknown-pragmas 146D LangEnabledBy(D, Wall) 147; Documented in C 148 149X 150D 151Generate JSON file. 152 153Xf 154D Joined Separate 155-Xf <file> Write JSON output to the given <file>. 156 157debuglib= 158Driver Joined 159Debug library to use instead of phobos. 160 161defaultlib= 162Driver Joined 163Default library to use instead of phobos. 164 165dstartfiles 166Driver 167Do link the standard D startup files in the compilation. 168 169-verbose 170D Alias(v) 171 172fall-instantiations 173D 174Generate code for all template instantiations. 175 176fassert 177D Var(flag_assert) 178Generate code for assert contracts. 179 180fbounds-check 181D 182; Documented in common.opt 183 184fbounds-check= 185D 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 188Enum 189Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs) 190 191EnumValue 192Enum(bounds_check) String(off) Value(0) 193 194EnumValue 195Enum(bounds_check) String(safeonly) Value(1) 196 197EnumValue 198Enum(bounds_check) String(on) Value(2) 199 200; Generates a secondary ModuleInfo symbol for linking in unittests 201fbuilding-libphobos-tests 202D Undocumented Var(flag_building_libphobos_tests) 203 204fbuiltin 205D Var(flag_no_builtin, 0) 206; Documented in C 207 208fdebug 209D 210Compile in debug code. 211 212fdebug= 213D Joined RejectNegative 214-fdebug=<level|ident> Compile in debug code, code <= <level>, or code identified by <ident>. 215 216fdoc 217D 218Generate documentation. 219 220fdoc-dir= 221D Joined RejectNegative 222-fdoc-dir=<dir> Write documentation file to directory <dir>. 223 224fdoc-file= 225D Joined RejectNegative 226-fdoc-file=<file> Write documentation to <file>. 227 228fdoc-inc= 229D Joined RejectNegative 230-fdoc-inc=<file> Include a Ddoc macro <file>. 231 232fdruntime 233D 234Assume that standard D runtime libraries and \"D main\" exist. 235 236fdump-d-original 237D 238Display the frontend AST after parsing and semantic passes. 239 240fignore-unknown-pragmas 241D 242Ignore unsupported pragmas. 243 244finvariants 245D Var(flag_invariants) 246Generate code for class invariant contracts. 247 248fmain 249D RejectNegative 250Generate a default D main() function when compiling. 251 252fmodule-file= 253D Joined RejectNegative 254-fmodule-file=<package.module>=<filespec> use <filespec> as source file for <package.module>. 255 256fmoduleinfo 257D Var(flag_moduleinfo) 258Generate ModuleInfo struct for output module. 259 260fonly= 261D Joined RejectNegative 262Process all modules specified on the command line, but only generate code for the module specified by the argument. 263 264fpostconditions 265D Var(flag_postconditions) 266Generate code for postcondition contracts. 267 268fpreconditions 269D Var(flag_preconditions) 270Generate code for precondition contracts. 271 272frelease 273D 274Compile release version. 275 276frtti 277D 278; Documented in C 279 280fswitch-errors 281D Var(flag_switch_errors) 282Generate code for switches without a default case. 283 284ftransition=all 285D RejectNegative 286List information on all language changes. 287 288ftransition=checkimports 289D RejectNegative 290Give deprecation messages about -ftransition=import anomalies. 291 292ftransition=complex 293D RejectNegative 294List all usages of complex or imaginary types. 295 296ftransition=dip1000 297D RejectNegative 298Implement DIP1000: Scoped pointers (experimental). 299 300ftransition=dip25 301D RejectNegative 302Implement DIP25: Sealed references (experimental). 303 304ftransition=field 305D RejectNegative 306List all non-mutable fields which occupy an object instance. 307 308ftransition=import 309D RejectNegative 310Revert to single phase name lookup. 311 312ftransition=nogc 313D RejectNegative 314List all hidden GC allocations. 315 316ftransition=tls 317D RejectNegative 318List all variables going into thread local storage. 319 320funittest 321D 322Compile in unittest code. 323 324fversion= 325D Joined RejectNegative 326-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>. 327 328fweak 329D Var(flag_weak) Init(1) 330Emit common-like symbols as weak symbols. 331 332imultilib 333D Joined Separate 334; Documented in C 335 336iprefix 337D Joined Separate 338; Documented in C 339 340isysroot 341D Joined Separate 342; Documented in C 343 344isystem 345D Joined Separate 346; Documented in C 347 348nophoboslib 349Driver 350Do not link the standard D library in the compilation. 351 352nostdinc 353D 354; Documented in C 355 356static-libphobos 357Driver 358Link the standard D library statically in the compilation. 359 360shared-libphobos 361Driver 362Link the standard D library dynamically in the compilation. 363 364v 365D 366; Documented in C 367