.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" 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 turned on, 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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 "2016-06-09" "gcc-5" "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\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR] [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...] [\fB\-o\fR \fIoutfile\fR] \fIinfile\fR... .PP For any given input file, the file name suffix determines what kind of compilation is done: .IP "\fIfile\fR\fB.d\fR" 4 .IX Item "file.d" D source files. .IP "\fIfile\fR\fB.di\fR" 4 .IX Item "file.di" D interface files. .IP "\fIfile\fR\fB.o\fR" 4 .IX Item "file.o" Object files to link in. .IP "\fIfile\fR\fB.a\fR" 4 .IX Item "file.a" Library files to link in .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. Most of these have both positive and negative forms; the negative form of \-ffoo would be \-fno\-foo. This manual documents only one of these two forms, whichever one is not the default. .PP The \fBgdc\fR command may be used to compile D source code into an object file, link a collection of object files together, or do both in sequence. .PP Only the most useful options are listed here; see below for the remainder. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-frelease\fR" 4 .IX Item "-frelease" Compile release version. .IP "\fB\-funittest\fR" 4 .IX Item "-funittest" Compile in unittest code. .IP "\fB\-fno\-assert\fR" 4 .IX Item "-fno-assert" Turn off code generation for runtime \fIassert()\fR's. .IP "\fB\-fno\-invariants\fR" 4 .IX Item "-fno-invariants" Turn off code generation for runtime \fIinvariant()\fR's. .IP "\fB\-fno\-in\fR" 4 .IX Item "-fno-in" Turn off code generation for runtime \fIin()\fR contracts. .IP "\fB\-fno\-out\fR" 4 .IX Item "-fno-out" Turn off code generation for runtime \fIout()\fR contracts. .IP "\fB\-fno\-bounds\-check\fR" 4 .IX Item "-fno-bounds-check" Turns off array bounds checking for all functions. .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. .IP "\fB\-fno\-emit\-moduleinfo\fR" 4 .IX Item "-fno-emit-moduleinfo" Turns off generation of module information and related functions. .IP "\fB\-fd\-verbose\fR" 4 .IX Item "-fd-verbose" Print information about D language processing to stdout. .IP "\fB\-fproperty\fR" 4 .IX Item "-fproperty" For D2, enforce \f(CW@property\fR syntax. .IP "\fB\-fd\-vtls\fR" 4 .IX Item "-fd-vtls" List all variables going into thread local storage. .IP "\fB\-fignore\-unknown\-pragmas\fR" 4 .IX Item "-fignore-unknown-pragmas" Ignore unsupported pragmas. .IP "\fB\-fsplit\-dynamic\-arrays\fR" 4 .IX Item "-fsplit-dynamic-arrays" Split dynamic arrays into length and pointer when passing to functions. .IP "\fB\-femit\-templates\fR" 4 .IX Item "-femit-templates" Control template emission behaviour. .Sp Turning on this option will emit all templates, but make them private to the translation unit. The executable will have multiple copies of code and data. .Sp Turning off this option will tell the compiler to not emit templates at all. .Sp The default behaviour is to emit templates, but only if the compiler determines that it needs to. .IP "\fB\-fdebug=\fR\fIopt\fR" 4 .IX Item "-fdebug=opt" Compile in debug code into the program. .Sp These are supported options: .RS 4 .IP "\fBlevel\fR" 4 .IX Item "level" Compile in debug code <= level. .IP "\fBident\fR" 4 .IX Item "ident" Compile in debug code identified by ident. .RE .RS 4 .RE .IP "\fB\-fdeps=\fR\fIfilename\fR" 4 .IX Item "-fdeps=filename" Write module dependencies to filename. .IP "\fB\-fmake\-deps=\fR\fIfilename\fR" 4 .IX Item "-fmake-deps=filename" Write makefile dependency output to the given file. .IP "\fB\-fmake\-mdeps=\fR\fIfilename\fR" 4 .IX Item "-fmake-mdeps=filename" Like \-fmake\-deps=\fIfilename\fR but ignore system header files. .IP "\fB\-fonly=\fR\fIfilename\fR" 4 .IX Item "-fonly=filename" Process all modules specified on the command line, but only generate code for the module specified by the argument. .IP "\fB\-fversion=\fR\fIopt\fR" 4 .IX Item "-fversion=opt" Compile in version code into the program. .Sp These are the supported options: .RS 4 .IP "\fBlevel\fR" 4 .IX Item "level" Compile in version code >= level. .IP "\fBident\fR" 4 .IX Item "ident" Compile in debug code identified by ident. .RE .RS 4 .RE .IP "\fB\-fintfc\fR" 4 .IX Item "-fintfc" Generate D interface files. .IP "\fB\-fintfc\-dir=\fR\fIdirectory\fR" 4 .IX Item "-fintfc-dir=directory" Write D interface files to \fIdirectory\fR. .IP "\fB\-fintfc\-file=\fR\fIfilename\fR" 4 .IX Item "-fintfc-file=filename" Write D interface file to \fIfilename\fR. .IP "\fB\-fdoc\fR" 4 .IX Item "-fdoc" Generate documentation. .IP "\fB\-fdoc\-dir=\fR\fIdirectory\fR" 4 .IX Item "-fdoc-dir=directory" Write documentation file in \fIdirectory\fR. .IP "\fB\-fdoc\-file=\fR\fIfilename\fR" 4 .IX Item "-fdoc-file=filename" Write documentation file to \fIfilename\fR. .IP "\fB\-fdoc\-inc=\fR\fIfilename\fR" 4 .IX Item "-fdoc-inc=filename" Include a Ddoc macro file. .IP "\fB\-fXf=\fR\fIfilename\fR" 4 .IX Item "-fXf=filename" Write \s-1JSON\s0 file to filename. .IP "\fB\-fdump\-source\fR" 4 .IX Item "-fdump-source" Dump decoded \s-1UTF\-8\s0 text from source. .IP "\fB\-Wcast\-result\fR" 4 .IX Item "-Wcast-result" Warn about casts that will produce a null or nil result. .IP "\fB\-Werror\fR" 4 .IX Item "-Werror" Make all warnings into errors. .IP "\fB\-Wno\-deprecated\fR" 4 .IX Item "-Wno-deprecated" Do not warn about usage of deprecated features. .IP "\fB\-Wunknown\-pragmas\fR" 4 .IX Item "-Wunknown-pragmas" Warn when a pragma is encountered that is not understood by \s-1GDC.\s0 .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, 2012, 2013 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, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the man page \fIgfdl\fR\|(7).