.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "GDC 1" .TH GDC 1 "2017-05-14" "gcc-7" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" gdc \- A GCC\-based compiler for the D language .SH "SYNOPSIS" .IX Header "SYNOPSIS" gdc [\fB\-c\fR|\fB\-S\fR] [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR] [\fB\-W\fR\fIwarn\fR...] [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...] [\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...] [\fB\-o\fR \fIoutfile\fR] [@\fIfile\fR] \fIinfile\fR... .PP Only the most useful options are listed here; see below for the remainder. .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBgdc\fR command is a frontend to \fBgcc\fR and supports many of the same options. This manual only documents the options specific to \fBgdc\fR. .SH "OPTIONS" .IX Header "OPTIONS" .SS "Input and Output files" .IX Subsection "Input and Output files" For any given input file, the file name suffix determines what kind of compilation is done. The following kinds of input file names are supported: .IP "\fIfile\fR\fB.d\fR" 4 .IX Item "file.d" D source files. .IP "\fIfile\fR\fB.dd\fR" 4 .IX Item "file.dd" Ddoc source files. .IP "\fIfile\fR\fB.di\fR" 4 .IX Item "file.di" D interface files. .PP You can specify more than one input file on the \fBgdc\fR command line, in which case they will all be compiled. If you specify a \&\f(CW\*(C`\-o \f(CIfile\f(CW\*(C'\fR option, all the input files will be compiled together, producing a single output file, named \fIfile\fR. This is allowed even when using \f(CW\*(C`\-S\*(C'\fR or \f(CW\*(C`\-c\*(C'\fR. .PP A D interface file contains only what an import of the module needs, rather than the whole implementation of that module. They can be created by \fBgdc\fR from a D source file by using the \f(CW\*(C`\-fintfc\*(C'\fR option. When the compiler resolves an import declaration, it searches for matching \&\fI.di\fR files first, then for \fI.d\fR. .PP A Ddoc source file contains code in the D macro processor language. It is primarily designed for use in producing user documentation from embedded comments, with a slight affinity towards \s-1HTML\s0 generation. If a \fI.d\fR source file starts with the string \f(CW\*(C`Ddoc\*(C'\fR then it is treated as general purpose documentation, not as a D source file. .SS "Runtime Options" .IX Subsection "Runtime Options" These options affect the runtime behavior of programs compiled with \&\fBgdc\fR. .IP "\fB\-fall\-instantiations\fR" 4 .IX Item "-fall-instantiations" Generate code for all template instantiations. The default template emission strategy is to not generate code for declarations that were either instantiated speculatively, such as from \f(CW\*(C`_\|_traits(compiles, ...)\*(C'\fR, or that come from an imported module not being compiled. .IP "\fB\-fno\-assert\fR" 4 .IX Item "-fno-assert" Turn off code generation for \f(CW\*(C`assert\*(C'\fR contracts. .IP "\fB\-fno\-bounds\-check\fR" 4 .IX Item "-fno-bounds-check" Turns off array bounds checking for all functions, which can improve performance for code that uses array extensively. Note that this can result in unpredictable behavior if the code in question actually does violate array bounds constraints. It is safe to use this option if you are sure that your code will never throw a \f(CW\*(C`RangeError\*(C'\fR. .IP "\fB\-fbounds\-check=\fR\fIvalue\fR" 4 .IX Item "-fbounds-check=value" An alternative to \fB\-fbounds\-check\fR that allows more control as to where bounds checking is turned on or off. The following values are supported: .RS 4 .IP "\fBon\fR" 4 .IX Item "on" Turns on array bounds checking for all functions. .IP "\fBsafeonly\fR" 4 .IX Item "safeonly" Turns on array bounds checking only for \f(CW@safe\fR functions. .IP "\fBoff\fR" 4 .IX Item "off" Turns off array bounds checking completely. .RE .RS 4 .RE .IP "\fB\-fno\-builtin\fR" 4 .IX Item "-fno-builtin" Don't recognize built-in functions that do not begin with \&\fB_\|_builtin_\fR as prefix. By default, the compiler will recognize when a function in the \f(CW\*(C`core.stdc\*(C'\fR package is a built-in function. .IP "\fB\-fdebug\fR" 4 .IX Item "-fdebug" .PD 0 .IP "\fB\-fdebug=\fR\fIvalue\fR" 4 .IX Item "-fdebug=value" .PD Turn on compilation of conditional \f(CW\*(C`debug\*(C'\fR code into the program. The \fB\-fdebug\fR option itself sets the debug level to \f(CW1\fR, while \fB\-fdebug=\fR enables \f(CW\*(C`debug\*(C'\fR code that are identified by any of the following values: .RS 4 .IP "\fBlevel\fR" 4 .IX Item "level" Sets the debug level to \fIlevel\fR, any \f(CW\*(C`debug\*(C'\fR code <= \fIlevel\fR is compiled into the program. .IP "\fBident\fR" 4 .IX Item "ident" Turns on compilation of any \f(CW\*(C`debug\*(C'\fR code identified by \fIident\fR. .RE .RS 4 .RE .IP "\fB\-fno\-invariants\fR" 4 .IX Item "-fno-invariants" Turns off code generation for class \f(CW\*(C`invariant\*(C'\fR contracts. .IP "\fB\-fno\-moduleinfo\fR" 4 .IX Item "-fno-moduleinfo" Turns off generation of the \f(CW\*(C`ModuleInfo\*(C'\fR and related functions that would become unreferenced without it, which may allow linking to programs not written in D. Functions that will not be generated include module constructor and destructors (\f(CW\*(C`static this\*(C'\fR and \&\f(CW\*(C`static ~this\*(C'\fR), \f(CW\*(C`unittest\*(C'\fR code, and \f(CW\*(C`DSO\*(C'\fR registry functions for dynamically linked code. .IP "\fB\-fonly=\fR\fIfilename\fR" 4 .IX Item "-fonly=filename" Tells the compiler to parse and run semantic analysis on all modules on the command line, but only generate code for the module specified by \fIfilename\fR. .IP "\fB\-fno\-postconditions\fR" 4 .IX Item "-fno-postconditions" Turns off code generation for postcondition \f(CW\*(C`out\*(C'\fR contracts. .IP "\fB\-fno\-preconditions\fR" 4 .IX Item "-fno-preconditions" Turns off code generation for precondition \f(CW\*(C`in\*(C'\fR contracts. .IP "\fB\-frelease\fR" 4 .IX Item "-frelease" Turns on compiling in release mode, which means not emitting runtime checks for contracts and asserts. Array bounds checking is not done for \f(CW@system\fR and \f(CW@trusted\fR functions, and assertion failures are undefined behaviour. .Sp This is equivalent to compiling with the following options: .Sp .Vb 2 \& gdc \-fno\-assert \-fbounds\-check=safe \-fno\-invariants \e \& \-fno\-postconditions \-fno\-preconditions \-fno\-switch\-errors .Ve .IP "\fB\-fno\-switch\-errors\fR" 4 .IX Item "-fno-switch-errors" This option controls what code should be generated when no case is matched in a \f(CW\*(C`final switch\*(C'\fR statement. The default run time behavior is that a \f(CW\*(C`SwitchError\*(C'\fR will be thrown. Turning off \&\fB\-fswitch\-errors\fR means that instead the execution of the program is immediately halted. .IP "\fB\-funittest\fR" 4 .IX Item "-funittest" Turns on compilation of \f(CW\*(C`unittest\*(C'\fR code, and turns on the \&\f(CW\*(C`version(unittest)\*(C'\fR identifier. This implies \fB\-fassert\fR. .IP "\fB\-fversion=\fR\fIvalue\fR" 4 .IX Item "-fversion=value" Turns on compilation of conditional \f(CW\*(C`version\*(C'\fR code into the program identified by any of the following values: .RS 4 .IP "\fBlevel\fR" 4 .IX Item "level" Sets the version level to \fIlevel\fR, any \f(CW\*(C`version\*(C'\fR code >= \fIlevel\fR is compiled into the program. .IP "\fBident\fR" 4 .IX Item "ident" Turns on compilation of \f(CW\*(C`version\*(C'\fR code identified by \fIident\fR. .RE .RS 4 .RE .SS "Options for Directory Search" .IX Subsection "Options for Directory Search" These options specify directories to search for files, libraries, and other parts of the compiler: .IP "\fB\-I\fR\fIdir\fR" 4 .IX Item "-Idir" Specify a directory to use when searching for imported modules at compile time. Multiple \fB\-I\fR options can be used, and the paths are searched in the same order. .IP "\fB\-J\fR\fIdir\fR" 4 .IX Item "-Jdir" Specify a directory to use when searching for files in string imports at compile time. This switch is required in order to use \&\f(CW\*(C`import(file)\*(C'\fR expressions. Multiple \fB\-J\fR options can be used, and the paths are searched in the same order. .IP "\fB\-L\fR\fIdir\fR" 4 .IX Item "-Ldir" When linking, specify a library search directory, as with \fBgcc\fR. .IP "\fB\-B\fR\fIdir\fR" 4 .IX Item "-Bdir" This option specifies where to find the executables, libraries, source files, and data files of the compiler itself, as with \fBgcc\fR. .IP "\fB\-fmodule\-filepath=\fR\fImodule\fR\fB=\fR\fIspec\fR" 4 .IX Item "-fmodule-filepath=module=spec" This option manipulates file paths of imported modules, such that if an imported module matches all or the leftmost part of \fImodule\fR, the file path in \fIspec\fR is used as the location to search for D sources. This is used when the source file path and names are not the same as the package and module hierachy. Consider the following examples: .Sp .Vb 1 \& gdc test.d \-fmodule\-filepath=A.B=foo.d \-fmodule\-filepath=C=bar .Ve .Sp This will tell the compiler to search in all import paths for the source file \fIfoo.d\fR when importing \fIA.B\fR, and the directory \fIbar/\fR when importing \fIC\fR, as annotated in the following D code: .Sp .Vb 4 \& module test; \& import A.B; // Matches A.B, searches for foo.d \& import C.D.E; // Matches C, searches for bar/D/E.d \& import A.B.C; // No match, searches for A/B/C.d .Ve .IP "\fB\-imultilib\fR \fIdir\fR" 4 .IX Item "-imultilib dir" Use \fIdir\fR as a subdirectory of the gcc directory containing target-specific D sources and interfaces. .IP "\fB\-iprefix\fR \fIprefix\fR" 4 .IX Item "-iprefix prefix" Specify \fIprefix\fR as the prefix for the gcc directory containing target-specific D sources and interfaces. If the \fIprefix\fR represents a directory, you should include the final \f(CW\*(Aq/\*(Aq\fR. .IP "\fB\-nostdinc\fR" 4 .IX Item "-nostdinc" Do not search the standard system directories for D source and interface files. Only the directories that have been specified with \fB\-I\fR options (and the directory of the current file, if appropriate) are searched. .SS "Code Generation" .IX Subsection "Code Generation" In addition to the many \fBgcc\fR options controlling code generation, \&\fBgdc\fR has several options specific to itself. .IP "\fB\-M\fR" 4 .IX Item "-M" Output the module dependencies of all source files being compiled in a format suitable for \fBmake\fR. The compiler outputs one \&\fBmake\fR rule containing the object file name for that source file, a colon, and the names of all imported files. .IP "\fB\-MM\fR" 4 .IX Item "-MM" Like \fB\-M\fR but does not mention imported modules from the D standard library package directories. .IP "\fB\-MF\fR \fIfile\fR" 4 .IX Item "-MF file" When used with \fB\-M\fR or \fB\-MM\fR, specifies a \fIfile\fR to write the dependencies to. When used with the driver options \fB\-MD\fR or \&\fB\-MMD\fR, \fB\-MF\fR overrides the default dependency output file. .IP "\fB\-MG\fR" 4 .IX Item "-MG" This option is for compatibility with \fBgcc\fR, and is ignored by the compiler. .IP "\fB\-MP\fR" 4 .IX Item "-MP" Outputs a phony target for each dependency other than the modules being compiled, causing each to depend on nothing. .IP "\fB\-MT\fR \fItarget\fR" 4 .IX Item "-MT target" Change the \fItarget\fR of the rule emitted by dependency generation to be exactly the string you specify. If you want multiple targets, you can specify them as a single argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options. .IP "\fB\-MQ\fR \fItarget\fR" 4 .IX Item "-MQ target" Same as \fB\-MT\fR, but it quotes any characters which are special to \&\fBmake\fR. .IP "\fB\-MD\fR" 4 .IX Item "-MD" This option is equivalent to \fB\-M \-MF\fR \fIfile\fR. The driver determines \fIfile\fR based on the name of the input file, removes any directory components and suffix, and applies a \fI.deps\fR suffix. .IP "\fB\-MMD\fR" 4 .IX Item "-MMD" Like \fB\-MD\fR but does not mention imported modules from the D standard library package directories. .IP "\fB\-X\fR" 4 .IX Item "-X" Output information describing the contents of all source files being compiled in \s-1JSON\s0 format to a file. The driver determines \fIfile\fR based on the name of the input file, removes any directory components and suffix, and applies a \fI.json\fR suffix. .IP "\fB\-Xf\fR \fIfile\fR" 4 .IX Item "-Xf file" Same as \fB\-X\fR, but writes all \s-1JSON\s0 contents to the specified \&\fIfile\fR. .IP "\fB\-fdeps\fR" 4 .IX Item "-fdeps" Dump module dependencies of all source files being compiled in a machine readable format. Suitable for any build tool that needs to track source file dependencies for incremental builds. .IP "\fB\-fdeps=\fR\fIfile\fR" 4 .IX Item "-fdeps=file" Same as \fB\-fdeps\fR, but writes dependencies to the specified \&\fIfile\fR. .IP "\fB\-fdoc\fR" 4 .IX Item "-fdoc" Generates \f(CW\*(C`Ddoc\*(C'\fR documentation and writes to a file. The compiler determines \fIfile\fR based on the name of the input file, removes any directory components and suffix, and applies a \fI.html\fR suffix. .IP "\fB\-fdoc\-dir=\fR\fIdir\fR" 4 .IX Item "-fdoc-dir=dir" Same as \fB\-fdoc\fR, but writes documentation to \fIdir\fR directory. This option can be used with \fB\-fdoc\-file=\fR\fIfile\fR to independently set the output file and directory path. .IP "\fB\-fdoc\-file=\fR\fIfile\fR" 4 .IX Item "-fdoc-file=file" Same as \fB\-fdoc\fR, but writes documentation to \fIfile\fR. This option can be used with \fB\-fdoc\-dir=\fR\fIdir\fR to independently set the output file and directory path. .IP "\fB\-fdoc\-inc=\fR\fIfile\fR" 4 .IX Item "-fdoc-inc=file" Specify \fIfile\fR as a \fIDdoc\fR macro file to be read. Multiple \&\fB\-fdoc\-inc\fR options can be used, and files are read and processed in the same order. .IP "\fB\-fintfc\fR" 4 .IX Item "-fintfc" Generates D interface files for all modules being compiled. The compiler determines the output \fIfile\fR based on the name of the input file, removes any directory components and suffix, and applies the \fI.di\fR suffix. .IP "\fB\-fintfc\-dir=\fR\fIdir\fR" 4 .IX Item "-fintfc-dir=dir" Same as \fB\-fintfc\fR, but writes interface files to \fIdir\fR directory. This option can be used with \fB\-fintfc\-file=\fR\fIfile\fR to independently set the output file and directory path. .IP "\fB\-fintfc\-file=\fR\fIfilename\fR" 4 .IX Item "-fintfc-file=filename" Same as \fB\-fintfc\fR but writes interface files to \fIfile\fR. This option can be used with \fB\-fintfc\-dir=\fR\fIdir\fR to independently set the output file and directory path. .SS "Warnings" .IX Subsection "Warnings" Warnings are diagnostic messages that report constructions that are not inherently erroneous but that are risky or suggest there is likely to be a bug in the program. Unless \fB\-Werror\fR is specified, they do not prevent compilation of the program. .IP "\fB\-Wall\fR" 4 .IX Item "-Wall" Turns on all warnings messages. Warnings are not a defined part of the D language, and all constructs for which this may generate a warning message are legal code. .IP "\fB\-Wcast\-result\fR" 4 .IX Item "-Wcast-result" Warn about casts that will produce a null or zero result. Currently this is only done for casting between an imaginary and non-imaginary data type, or casting between a D and \*(C+ class. .IP "\fB\-Wno\-deprecated\fR" 4 .IX Item "-Wno-deprecated" Do not warn about usage of deprecated features and symbols with \&\f(CW\*(C`deprecated\*(C'\fR attributes. .IP "\fB\-Werror\fR" 4 .IX Item "-Werror" Turns all warnings into errors. .IP "\fB\-Wspeculative\fR" 4 .IX Item "-Wspeculative" Report on all error messages from speculative compiles, such as \&\f(CW\*(C`_\|_traits(compiles, ...)\*(C'\fR. This option does not report messages as warnings, and these messages therefore never become errors when the \fB\-Werror\fR option is also used. .IP "\fB\-Wtemplates\fR" 4 .IX Item "-Wtemplates" Warn when a template instantiation is encountered. Some coding rules disallow templates, and this may be used to enforce that rule. .IP "\fB\-Wunknown\-pragmas\fR" 4 .IX Item "-Wunknown-pragmas" Warn when a \f(CW\*(C`pragma()\*(C'\fR is encountered that is not understood by \&\fBgdc\fR. This differs from \fB\-fignore\-unknown\-pragmas\fR where a pragma that is part of the D language, but not implemented by the compiler, will not get reported. .IP "\fB\-fignore\-unknown\-pragmas\fR" 4 .IX Item "-fignore-unknown-pragmas" Turns off errors for unsupported pragmas. .IP "\fB\-fmax\-errors=\fR\fIn\fR" 4 .IX Item "-fmax-errors=n" Limits the maximum number of error messages to \fIn\fR, at which point \&\fBgdc\fR bails out rather than attempting to continue processing the source code. If \fIn\fR is 0 (the default), there is no limit on the number of error messages produced. .IP "\fB\-fproperty\fR" 4 .IX Item "-fproperty" Enforces the \f(CW@property\fR syntax in D. .IP "\fB\-fsyntax\-only\fR" 4 .IX Item "-fsyntax-only" Check the code for syntax errors, but do not actually compile it. This only suppresses the generation of the object code, and can be used in conjunction with \fB\-fdoc\fR or \fB\-fintfc\fR options. .IP "\fB\-ftransition=\fR\fIid\fR" 4 .IX Item "-ftransition=id" Report additional information about D language changes identified by \&\fIid\fR. The following values are supported: .RS 4 .IP "\fBall\fR" 4 .IX Item "all" List information on all language changes. .IP "\fBcheckimports\fR" 4 .IX Item "checkimports" Give deprecation messages about \fB\-ftransition=import\fR anomalies. .IP "\fBcomplex\fR" 4 .IX Item "complex" List all usages of complex or imaginary types. .IP "\fBdip1000\fR" 4 .IX Item "dip1000" Implements <\fBhttp://wiki.dlang.org/DIP1000\fR> (experimental). .IP "\fBdip25\fR" 4 .IX Item "dip25" Implements <\fBhttp://wiki.dlang.org/DIP25\fR> (experimental). .IP "\fBfield\fR" 4 .IX Item "field" List all non-mutable fields which occupy an object instance. .IP "\fBimport\fR" 4 .IX Item "import" Tells the compiler to revert to using an old lookup behavior for resolving unqualified symbol names, where this was done in a single pass, ignoring any protection attributes. The default name lookup strategy is to use two passes, the first ignoring imported declarations, and the second only looking at imports. The protection (\f(CW\*(C`private\*(C'\fR, \f(CW\*(C`package\*(C'\fR, \f(CW\*(C`protected\*(C'\fR) of symbols is also enforced to resolve any conflicts between private and public symbols. .IP "\fBnogc\fR" 4 .IX Item "nogc" List all hidden \s-1GC\s0 allocations. .IP "\fBtls\fR" 4 .IX Item "tls" List all variables going into thread local storage. .RE .RS 4 .RE .SS "Options for Linking" .IX Subsection "Options for Linking" These options come into play when the compiler links object files into an executable output file. They are meaningless if the compiler is not doing a link step. .IP "\fB\-defaultlib\fR \fIlibname\fR" 4 .IX Item "-defaultlib libname" Specify the library to use instead of libphobos when linking. Options specifying the linkage of libphobos, such as \fB\-static\-libphobos\fR or \fB\-shared\-libphobos\fR, are ignored. .IP "\fB\-debuglib\fR" 4 .IX Item "-debuglib" Specify the debug library to use instead of libphobos when linking. This option has no effect unless the \fB\-g\fR option was also given on the command line. Options specifying the linkage of libphobos, such as \fB\-static\-libphobos\fR or \fB\-shared\-libphobos\fR, are ignored. .IP "\fB\-nophoboslib\fR" 4 .IX Item "-nophoboslib" Do not use the Phobos or D runtime library when linking. Options specifying the linkage of libphobos, such as \fB\-static\-libphobos\fR or \&\fB\-shared\-libphobos\fR, are ignored. The standard system libraries are used normally, unless \fB\-nostdlib\fR or \fB\-nodefaultlibs\fR is used. .IP "\fB\-shared\-libphobos\fR" 4 .IX Item "-shared-libphobos" On systems that provide \fIlibgphobos\fR and \fIlibgdruntime\fR as a shared and a static library, this option forces the use of the shared version. If no shared version was built when the compiler was configured, this option has no effect. .IP "\fB\-static\-libphobos\fR" 4 .IX Item "-static-libphobos" On systems that provide \fIlibgphobos\fR and \fIlibgdruntime\fR as a shared and a static library, this option forces the use of the static version. If no static version was built when the compiler was configured, this option has no effect. .SS "Developer Options" .IX Subsection "Developer Options" This section describes command-line options that are primarily of interest to developers or language tooling. .IP "\fB\-fdump\-d\-original\fR" 4 .IX Item "-fdump-d-original" Dump the front-end \s-1AST\s0 after after parsing and running semantic on the source program. Only really useful for debugging the compiler itself. .IP "\fB\-v\fR" 4 .IX Item "-v" Dump information about the compiler language processing stages as the source program is being compiled. This includes listing all modules that are processed through the \f(CW\*(C`parse\*(C'\fR, \f(CW\*(C`semantic\*(C'\fR, \f(CW\*(C`semantic2\*(C'\fR, and \&\f(CW\*(C`semantic3\*(C'\fR stages; all \f(CW\*(C`import\*(C'\fR modules and their file paths; and all \f(CW\*(C`function\*(C'\fR bodies that are being compiled. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" In addition to the many \fBgcc\fR environment variables that control its operation, \fBgdc\fR has a few environment variables specific to itself. .IP "\fBD_IMPORT_PATH\fR" 4 .IX Item "D_IMPORT_PATH" The value of \fBD_IMPORT_PATH\fR is a list of directories separated by a special character, much like \fB\s-1PATH\s0\fR, in which to look for imports. The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a semicolon, and for almost all other targets it is a colon. .IP "\fB\s-1DDOCFILE\s0\fR" 4 .IX Item "DDOCFILE" If \fB\s-1DDOCFILE\s0\fR is set, it specifies a text file of macro definitions to be read and used by the Ddoc generator. This overrides any macros defined in other \fI.ddoc\fR files. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7), \fIgcc\fR\|(1) and the Info entries for \fIgdc\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2011\-2017 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). .PP (a) The \s-1FSF\s0's Front-Cover Text is: .PP .Vb 1 \& A GNU Manual .Ve .PP (b) The \s-1FSF\s0's Back-Cover Text is: .PP .Vb 3 \& You have freedom to copy and modify this GNU Manual, like GNU \& software. Copies published by the Free Software Foundation raise \& funds for GNU development. .Ve