1 ; lang.opt -- Options for the D front end.
2 ; Copyright (C) 2006-2020 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
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
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.
29 -print-missing-file-dependencies
38 D NoDriverArg Separate Alias(MD)
41 -write-user-dependencies
42 D NoDriverArg Separate Alias(MMD)
47 ; Different from documented use in C.
51 -Hd <dir> Write D interface files to directory <dir>.
55 -Hf <file> Write D interface to <file>.
63 ; Different from documented use in Fortran.
70 D Separate NoDriverArg
86 D Separate NoDriverArg
102 D Warning Var(warn_address) LangEnabledBy(D, Wextra)
117 Wno-alloca-larger-than
122 D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra)
123 Warn about casts that will produce a null result.
127 ; Documented in common.opt
131 ; Documented in common.opt
139 Warn from speculative compiles such as __traits(compiles).
146 D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
159 -Xf <file> Write JSON output to the given <file>.
163 Debug library to use instead of phobos.
167 Default library to use instead of phobos.
171 Do link the standard D startup files in the compilation.
178 Generate code for all template instantiations.
182 Generate code for assert contracts.
186 ; Documented in common.opt
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.
193 Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)
196 Enum(bounds_check) String(off) Value(0)
199 Enum(bounds_check) String(safeonly) Value(1)
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)
209 D Var(flag_no_builtin, 0)
214 Compile in debug code.
217 D Joined RejectNegative
218 -fdebug=<level|ident> Compile in debug code, code <= <level>, or code identified by <ident>.
222 Generate documentation.
225 D Joined RejectNegative
226 -fdoc-dir=<dir> Write documentation file to directory <dir>.
229 D Joined RejectNegative
230 -fdoc-file=<file> Write documentation to <file>.
233 D Joined RejectNegative
234 -fdoc-inc=<file> Include a Ddoc macro <file>.
238 Assume that standard D runtime libraries and \"D main\" exist.
242 Display the frontend AST after parsing and semantic passes.
244 fignore-unknown-pragmas
246 Ignore unsupported pragmas.
249 D Var(flag_invariants)
250 Generate code for class invariant contracts.
254 Generate a default D main() function when compiling.
257 D Joined RejectNegative
258 -fmodule-file=<package.module>=<filespec> use <filespec> as source file for <package.module>.
261 D Var(flag_moduleinfo)
262 Generate ModuleInfo struct for output module.
265 D Joined RejectNegative
266 Process all modules specified on the command line, but only generate code for the module specified by the argument.
269 D Var(flag_postconditions)
270 Generate code for postcondition contracts.
273 D Var(flag_preconditions)
274 Generate code for precondition contracts.
278 Compile release version.
285 D Var(flag_switch_errors)
286 Generate code for switches without a default case.
290 List information on all language changes.
292 ftransition=checkimports
294 Give deprecation messages about -ftransition=import anomalies.
298 List all usages of complex or imaginary types.
302 Implement DIP1000: Scoped pointers (experimental).
306 Implement DIP25: Sealed references (experimental).
310 List all non-mutable fields which occupy an object instance.
314 Revert to single phase name lookup.
318 List all hidden GC allocations.
322 List all variables going into thread local storage.
326 Compile in unittest code.
329 D Joined RejectNegative
330 -fversion=<level|ident> Compile in version code >= <level> or identified by <ident>.
333 D Var(flag_weak) Init(1)
334 Emit common-like symbols as weak symbols.
354 Do not link the standard D library in the compilation.
362 Link the standard D library statically in the compilation.
366 Link the standard D library dynamically in the compilation.