1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef TOOLS_GN_VARIABLES_H_
6 #define TOOLS_GN_VARIABLES_H_
10 #include "base/strings/string_piece.h"
14 // Builtin vars ----------------------------------------------------------------
16 extern const char kHostCpu
[];
17 extern const char kHostCpu_HelpShort
[];
18 extern const char kHostCpu_Help
[];
20 extern const char kHostOs
[];
21 extern const char kHostOs_HelpShort
[];
22 extern const char kHostOs_Help
[];
24 extern const char kCurrentCpu
[];
25 extern const char kCurrentCpu_HelpShort
[];
26 extern const char kCurrentCpu_Help
[];
28 extern const char kCurrentOs
[];
29 extern const char kCurrentOs_HelpShort
[];
30 extern const char kCurrentOs_Help
[];
32 extern const char kCurrentToolchain
[];
33 extern const char kCurrentToolchain_HelpShort
[];
34 extern const char kCurrentToolchain_Help
[];
36 extern const char kDefaultToolchain
[];
37 extern const char kDefaultToolchain_HelpShort
[];
38 extern const char kDefaultToolchain_Help
[];
40 extern const char kPythonPath
[];
41 extern const char kPythonPath_HelpShort
[];
42 extern const char kPythonPath_Help
[];
44 extern const char kRootBuildDir
[];
45 extern const char kRootBuildDir_HelpShort
[];
46 extern const char kRootBuildDir_Help
[];
48 extern const char kRootGenDir
[];
49 extern const char kRootGenDir_HelpShort
[];
50 extern const char kRootGenDir_Help
[];
52 extern const char kRootOutDir
[];
53 extern const char kRootOutDir_HelpShort
[];
54 extern const char kRootOutDir_Help
[];
56 extern const char kTargetCpu
[];
57 extern const char kTargetCpu_HelpShort
[];
58 extern const char kTargetCpu_Help
[];
60 extern const char kTargetOs
[];
61 extern const char kTargetOs_HelpShort
[];
62 extern const char kTargetOs_Help
[];
64 extern const char kTargetGenDir
[];
65 extern const char kTargetGenDir_HelpShort
[];
66 extern const char kTargetGenDir_Help
[];
68 extern const char kTargetOutDir
[];
69 extern const char kTargetOutDir_HelpShort
[];
70 extern const char kTargetOutDir_Help
[];
72 // Target vars -----------------------------------------------------------------
74 extern const char kAllDependentConfigs
[];
75 extern const char kAllDependentConfigs_HelpShort
[];
76 extern const char kAllDependentConfigs_Help
[];
78 extern const char kAllowCircularIncludesFrom
[];
79 extern const char kAllowCircularIncludesFrom_HelpShort
[];
80 extern const char kAllowCircularIncludesFrom_Help
[];
82 extern const char kArgs
[];
83 extern const char kArgs_HelpShort
[];
84 extern const char kArgs_Help
[];
86 extern const char kCflags
[];
87 extern const char kCflags_HelpShort
[];
88 extern const char* kCflags_Help
;
90 extern const char kCflagsC
[];
91 extern const char kCflagsC_HelpShort
[];
92 extern const char* kCflagsC_Help
;
94 extern const char kCflagsCC
[];
95 extern const char kCflagsCC_HelpShort
[];
96 extern const char* kCflagsCC_Help
;
98 extern const char kCflagsObjC
[];
99 extern const char kCflagsObjC_HelpShort
[];
100 extern const char* kCflagsObjC_Help
;
102 extern const char kCflagsObjCC
[];
103 extern const char kCflagsObjCC_HelpShort
[];
104 extern const char* kCflagsObjCC_Help
;
106 extern const char kCflagsPCHC
[];
107 extern const char kCflagsPCHC_HelpShort
[];
108 extern const char* kCflagsPCHC_Help
;
110 extern const char kCflagsPCHCC
[];
111 extern const char kCflagsPCHCC_HelpShort
[];
112 extern const char* kCflagsPCHCC_Help
;
114 extern const char kCflagsPCHObjC
[];
115 extern const char kCflagsPCHObjC_HelpShort
[];
116 extern const char* kCflagsPCHObjC_Help
;
118 extern const char kCflagsPCHObjCC
[];
119 extern const char kCflagsPCHObjCC_HelpShort
[];
120 extern const char* kCflagsPCHObjCC_Help
;
122 extern const char kCheckIncludes
[];
123 extern const char kCheckIncludes_HelpShort
[];
124 extern const char kCheckIncludes_Help
[];
126 extern const char kCompleteStaticLib
[];
127 extern const char kCompleteStaticLib_HelpShort
[];
128 extern const char kCompleteStaticLib_Help
[];
130 extern const char kConfigs
[];
131 extern const char kConfigs_HelpShort
[];
132 extern const char kConfigs_Help
[];
134 extern const char kData
[];
135 extern const char kData_HelpShort
[];
136 extern const char kData_Help
[];
138 extern const char kDataDeps
[];
139 extern const char kDataDeps_HelpShort
[];
140 extern const char kDataDeps_Help
[];
142 extern const char kDefines
[];
143 extern const char kDefines_HelpShort
[];
144 extern const char kDefines_Help
[];
146 extern const char kDepfile
[];
147 extern const char kDepfile_HelpShort
[];
148 extern const char kDepfile_Help
[];
150 extern const char kDeps
[];
151 extern const char kDeps_HelpShort
[];
152 extern const char kDeps_Help
[];
154 extern const char kForwardDependentConfigsFrom
[];
155 extern const char kForwardDependentConfigsFrom_HelpShort
[];
156 extern const char kForwardDependentConfigsFrom_Help
[];
158 extern const char kIncludeDirs
[];
159 extern const char kIncludeDirs_HelpShort
[];
160 extern const char kIncludeDirs_Help
[];
162 extern const char kInputs
[];
163 extern const char kInputs_HelpShort
[];
164 extern const char kInputs_Help
[];
166 extern const char kLdflags
[];
167 extern const char kLdflags_HelpShort
[];
168 extern const char kLdflags_Help
[];
170 extern const char kLibDirs
[];
171 extern const char kLibDirs_HelpShort
[];
172 extern const char kLibDirs_Help
[];
174 extern const char kLibs
[];
175 extern const char kLibs_HelpShort
[];
176 extern const char kLibs_Help
[];
178 extern const char kOutputExtension
[];
179 extern const char kOutputExtension_HelpShort
[];
180 extern const char kOutputExtension_Help
[];
182 extern const char kOutputName
[];
183 extern const char kOutputName_HelpShort
[];
184 extern const char kOutputName_Help
[];
186 extern const char kOutputs
[];
187 extern const char kOutputs_HelpShort
[];
188 extern const char kOutputs_Help
[];
190 extern const char kPrecompiledHeader
[];
191 extern const char kPrecompiledHeader_HelpShort
[];
192 extern const char kPrecompiledHeader_Help
[];
194 extern const char kPrecompiledSource
[];
195 extern const char kPrecompiledSource_HelpShort
[];
196 extern const char kPrecompiledSource_Help
[];
198 extern const char kPublic
[];
199 extern const char kPublic_HelpShort
[];
200 extern const char kPublic_Help
[];
202 extern const char kPublicConfigs
[];
203 extern const char kPublicConfigs_HelpShort
[];
204 extern const char kPublicConfigs_Help
[];
206 extern const char kPublicDeps
[];
207 extern const char kPublicDeps_HelpShort
[];
208 extern const char kPublicDeps_Help
[];
210 extern const char kScript
[];
211 extern const char kScript_HelpShort
[];
212 extern const char kScript_Help
[];
214 extern const char kSources
[];
215 extern const char kSources_HelpShort
[];
216 extern const char kSources_Help
[];
218 extern const char kTestonly
[];
219 extern const char kTestonly_HelpShort
[];
220 extern const char kTestonly_Help
[];
222 extern const char kVisibility
[];
223 extern const char kVisibility_HelpShort
[];
224 extern const char kVisibility_Help
[];
226 // -----------------------------------------------------------------------------
228 struct VariableInfo
{
230 VariableInfo(const char* in_help_short
,
231 const char* in_help
);
233 const char* help_short
;
237 typedef std::map
<base::StringPiece
, VariableInfo
> VariableInfoMap
;
239 // Returns the built-in readonly variables.
240 // Note: this is used only for help so this getter is not threadsafe.
241 const VariableInfoMap
& GetBuiltinVariables();
243 // Returns the variables used by target generators.
244 // Note: this is used only for help so this getter is not threadsafe.
245 const VariableInfoMap
& GetTargetVariables();
247 } // namespace variables
249 #endif // TOOLS_GN_VARIABLES_H_