renamed SCons.Tool.ninja -> SCons.Tool.ninja_tool and added alias in tool loading...
[scons.git] / SCons / Tool / cc.xml
blob065f608c1ef141e732978a892a11c4fa1ccd59aa
1 <?xml version="1.0"?>
2 <!--
3 SPDX-FileCopyrightText: Copyright The SCons Foundation (https://scons.org)
4 SPDX-License-Identifier: MIT
5 SPDX-FileType: DOCUMENTATION
7 This file is processed by the bin/SConsDoc.py module.
8 -->
10 <!DOCTYPE sconsdoc [
11 <!ENTITY % scons SYSTEM '../../doc/scons.mod'>
12 %scons;
13 <!ENTITY % builders-mod SYSTEM '../../doc/generated/builders.mod'>
14 %builders-mod;
15 <!ENTITY % functions-mod SYSTEM '../../doc/generated/functions.mod'>
16 %functions-mod;
17 <!ENTITY % tools-mod SYSTEM '../../doc/generated/tools.mod'>
18 %tools-mod;
19 <!ENTITY % variables-mod SYSTEM '../../doc/generated/variables.mod'>
20 %variables-mod;
23 <sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
24           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25           xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
27 <tool name="cc">
28 <summary>
29 <para>
30 Sets construction variables for generic POSIX C compilers.
31 </para>
32 </summary>
33 <sets>
34 <item><!--_CCCOMCOM--></item>
35 <item>FRAMEWORKS</item>
36 <item>FRAMEWORKPATH</item>
37 <item>CC</item>
38 <item>CFLAGS</item>
39 <item>CCFLAGS</item>
40 <item>CCCOM</item>
41 <item>SHCC</item>
42 <item>SHCFLAGS</item>
43 <item>SHCCFLAGS</item>
44 <item>SHCCCOM</item>
45 <item>CPPDEFPREFIX</item>
46 <item>CPPDEFSUFFIX</item>
47 <item>INCPREFIX</item>
48 <item>INCSUFFIX</item>
49 <item>SHOBJSUFFIX</item>
50 <item><!--STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME--></item>
51 <item>CFILESUFFIX</item>
52  <item>CCDEPFLAGS</item>
53 </sets>
54 <uses>
55 <item>PLATFORM</item>
56 <item>CCCOMSTR</item>
57 <item>SHCCCOMSTR</item>
58 </uses>
59 </tool>
61 <cvar name="CC">
62 <summary>
63 <para>
64 The C compiler.
65 </para>
66 </summary>
67 </cvar>
69 <cvar name="CCCOM">
70 <summary>
71 <para>
72 The command line used to compile a C source file to a (static) object
73 file.  Any options specified in the &cv-link-CFLAGS;, &cv-link-CCFLAGS; and
74 &cv-link-CPPFLAGS; construction variables are included on this command line.
75 See also &cv-link-SHCCCOM; for compiling to shared objects.
76 </para>
77 </summary>
78 </cvar>
80 <cvar name="CCCOMSTR">
81 <summary>
82 <para>
83 If set, the string displayed when a C source file
84 is compiled to a (static) object file.
85 If not set, then &cv-link-CCCOM; (the command line) is displayed.
86 See also &cv-link-SHCCCOMSTR; for compiling to shared objects.
87 </para>
89 <example_commands>
90 env = Environment(CCCOMSTR = "Compiling static object $TARGET")
91 </example_commands>
92 </summary>
93 </cvar>
95 <cvar name="CCFLAGS">
96 <summary>
97 <para>
98 General options that are passed to the C and C++ compilers.
99 See also &cv-link-SHCCFLAGS; for compiling to shared objects.
100 </para>
101 </summary>
102 </cvar>
104 <cvar name="CFLAGS">
105 <summary>
106 <para>
107 General options that are passed to the C compiler (C only; not C++).
108 See also &cv-link-SHCFLAGS; for compiling to shared objects.
109 </para>
110 </summary>
111 </cvar>
113 <cvar name="CPPFLAGS">
114 <summary>
115 <para>
116 User-specified C preprocessor options.
117 These will be included in any command that uses the C preprocessor,
118 including not just compilation of C and C++ source files
119 via the &cv-link-CCCOM;,
120 &cv-link-SHCCCOM;,
121 &cv-link-CXXCOM; and
122 &cv-link-SHCXXCOM; command lines,
123 but also the &cv-link-FORTRANPPCOM;,
124 &cv-link-SHFORTRANPPCOM;,
125 &cv-link-F77PPCOM; and
126 &cv-link-SHF77PPCOM; command lines
127 used to compile a Fortran source file,
128 and the &cv-link-ASPPCOM; command line
129 used to assemble an assembly language source file,
130 after first running each file through the C preprocessor.
131 Note that this variable does
132 <emphasis>not</emphasis>
133 contain
134 <option>-I</option>
135 (or similar) include search path options
136 that scons generates automatically from &cv-link-CPPPATH;.
137 See &cv-link-_CPPINCFLAGS;, below,
138 for the variable that expands to those options.
139 </para>
140 </summary>
141 </cvar>
143 <cvar name="CPPSUFFIXES">
144 <summary>
145 <para>
146 The list of suffixes of files that will be scanned
147 for C preprocessor implicit dependencies
148 (#include lines).
149 The default list is:
150 </para>
152 <example_commands>
153 [".c", ".C", ".cxx", ".cpp", ".c++", ".cc",
154  ".h", ".H", ".hxx", ".hpp", ".hh",
155  ".F", ".fpp", ".FPP",
156  ".m", ".mm",
157  ".S", ".spp", ".SPP"]
158 </example_commands>
159 </summary>
160 </cvar>
162 <cvar name="SHCC">
163 <summary>
164 <para>
165 The C compiler used for generating shared-library objects.
166 See also &cv-link-CC; for compiling to static objects.
167 </para>
168 </summary>
169 </cvar>
171 <cvar name="SHCCCOM">
172 <summary>
173 <para>
174 The command line used to compile a C source file
175 to a shared-library object file.
176 Any options specified in the &cv-link-SHCFLAGS;,
177 &cv-link-SHCCFLAGS; and
178 &cv-link-CPPFLAGS; construction variables
179 are included on this command line.
180 See also &cv-link-CCCOM; for compiling to static objects.
181 </para>
182 </summary>
183 </cvar>
185 <cvar name="SHCCCOMSTR">
186 <summary>
187 <para>
188 If set, the string displayed when a C source file
189 is compiled to a shared object file.
190 If not set, then &cv-link-SHCCCOM; (the command line) is displayed.
191 See also &cv-link-CCCOMSTR; for compiling to static objects.
192 </para>
194 <example_commands>
195 env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET")
196 </example_commands>
197 </summary>
198 </cvar>
200 <cvar name="SHCCFLAGS">
201 <summary>
202 <para>
203 Options that are passed to the C and C++ compilers
204 to generate shared-library objects.
205 See also &cv-link-CCFLAGS; for compiling to static objects.
206 </para>
207 </summary>
208 </cvar>
210 <cvar name="SHCFLAGS">
211 <summary>
212 <para>
213 Options that are passed to the C compiler (only; not C++)
214 to generate shared-library objects.
215 See also &cv-link-CFLAGS; for compiling to static objects.
216 </para>
217 </summary>
218 </cvar>
220 <cvar name="CCDEPFLAGS">
221 <summary>
222 <para>
223 Options to pass to C or C++ compiler to generate list of dependency files.
224 </para>
225  <para>
226   This is set only by compilers which support this functionality. (&t-link-gcc;, &t-link-clang;, and &t-link-msvc; currently)
227  </para>
228 </summary>
229 </cvar>
232 </sconsdoc>