blob: b35a79ec4438c59b905d12522789d702c31cdd86 [file] [log] [blame]
alokp@chromium.org29d56fb2010-04-06 15:42:22 +00001# Copyright (c) 2010 The ANGLE Project 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.
4
5{
Geoff Langd095bda2014-04-07 14:21:14 -04006 'includes': [ 'common_defines.gypi', ],
Geoff Lang3cd50f72014-01-10 13:04:48 -05007 'variables':
8 {
Geoff Lang3cd50f72014-01-10 13:04:48 -05009 'angle_build_tests%': '1',
10 'angle_build_samples%': '1',
11 # angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp.
12 # angle_code is set to 0 for test code, sample code, and third party code.
13 # When angle_code is 1, we build with additional warning flags on Mac and Linux.
14 'angle_code%': 0,
Geoff Lang16851c82014-02-10 13:31:32 -050015 'release_symbols%': 'true',
Geoff Lang3cd50f72014-01-10 13:04:48 -050016 'gcc_or_clang_warnings':
17 [
18 '-Wall',
19 '-Wchar-subscripts',
20 '-Werror',
21 '-Wextra',
22 '-Wformat=2',
23 '-Winit-self',
24 '-Wno-sign-compare',
25 '-Wno-unused-function',
26 '-Wno-unused-parameter',
27 '-Wno-unknown-pragmas',
28 '-Wpacked',
29 '-Wpointer-arith',
30 '-Wundef',
31 '-Wwrite-strings',
Jamie Madille78603b2014-02-19 16:27:39 -050032 '-Wno-reorder',
33 '-Wno-format-nonliteral',
Geoff Lang3cd50f72014-01-10 13:04:48 -050034 ],
apatrick@chromium.org9dc0a242012-01-24 21:45:37 +000035 },
Geoff Lang3cd50f72014-01-10 13:04:48 -050036 'target_defaults':
37 {
38 'default_configuration': 'Debug',
39 'variables':
40 {
41 'warn_as_error%': 1,
apatrick@chromium.org9dc0a242012-01-24 21:45:37 +000042 },
Geoff Lang3cd50f72014-01-10 13:04:48 -050043 'target_conditions':
44 [
45 ['warn_as_error == 1',
46 {
47 'msvs_settings':
48 {
49 'VCCLCompilerTool':
50 {
51 'WarnAsError': 'true',
52 },
53 },
54 }],
shannon.woods@transgaming.com2001a0c2013-01-25 21:56:47 +000055 ],
Geoff Lang3cd50f72014-01-10 13:04:48 -050056 'configurations':
57 {
58 'Common_Base':
59 {
60 'abstract': 1,
61 'msvs_configuration_attributes':
62 {
63 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)_$(Platform)',
64 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
Geoff Lang5df9f522014-05-16 10:37:47 -040065 'CharacterSet': '0', # ASCII
Geoff Lang3cd50f72014-01-10 13:04:48 -050066 },
67 'msvs_settings':
68 {
69 'VCCLCompilerTool':
70 {
71 'AdditionalOptions': ['/MP'],
72 'BufferSecurityCheck': 'true',
73 'DebugInformationFormat': '3',
Geoff Langbfdea662014-07-23 14:16:32 -040074 'ExceptionHandling': '0',
Geoff Lang3cd50f72014-01-10 13:04:48 -050075 'EnableFunctionLevelLinking': 'true',
76 'MinimalRebuild': 'false',
Geoff Lang6cec8502014-04-19 12:39:25 -040077 'RuntimeTypeInfo': 'true',
Geoff Lang3cd50f72014-01-10 13:04:48 -050078 'WarningLevel': '4',
79 },
80 'VCLinkerTool':
81 {
82 'FixedBaseAddress': '1',
Geoff Lang3cd50f72014-01-10 13:04:48 -050083 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
84 'MapFileName': '$(OutDir)\\$(TargetName).map',
85 # Most of the executables we'll ever create are tests
86 # and utilities with console output.
87 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
Geoff Lang3cd50f72014-01-10 13:04:48 -050088 },
89 'VCResourceCompilerTool':
90 {
91 'Culture': '1033',
92 },
93 },
Geoff Lang3cd50f72014-01-10 13:04:48 -050094 }, # Common_Base
Geoff Lang78059902013-10-11 14:33:01 -040095
Geoff Lang3cd50f72014-01-10 13:04:48 -050096 'Debug_Base':
97 {
98 'abstract': 1,
99 'msvs_settings':
100 {
101 'VCCLCompilerTool':
102 {
103 'Optimization': '0', # /Od
Geoff Lang3cd50f72014-01-10 13:04:48 -0500104 'BasicRuntimeChecks': '3',
105 'RuntimeLibrary': '1', # /MTd (debug static)
106 },
107 'VCLinkerTool':
108 {
Geoff Lang16851c82014-02-10 13:31:32 -0500109 'GenerateDebugInformation': 'true',
Geoff Lang3cd50f72014-01-10 13:04:48 -0500110 'LinkIncremental': '2',
111 },
112 },
113 'xcode_settings':
114 {
115 'COPY_PHASE_STRIP': 'NO',
116 'GCC_OPTIMIZATION_LEVEL': '0',
117 },
118 }, # Debug_Base
Geoff Lang78059902013-10-11 14:33:01 -0400119
Geoff Lang3cd50f72014-01-10 13:04:48 -0500120 'Release_Base':
121 {
122 'abstract': 1,
123 'msvs_settings':
124 {
125 'VCCLCompilerTool':
126 {
127 'Optimization': '2', # /Os
Geoff Lang3cd50f72014-01-10 13:04:48 -0500128 'RuntimeLibrary': '0', # /MT (static)
129 },
130 'VCLinkerTool':
131 {
Geoff Lang16851c82014-02-10 13:31:32 -0500132 'GenerateDebugInformation': '<(release_symbols)',
Geoff Lang3cd50f72014-01-10 13:04:48 -0500133 'LinkIncremental': '1',
134 },
135 },
136 }, # Release_Base
Geoff Lang78059902013-10-11 14:33:01 -0400137
Geoff Lang3cd50f72014-01-10 13:04:48 -0500138 'x86_Base':
139 {
140 'abstract': 1,
141 'msvs_configuration_platform': 'Win32',
142 'msvs_settings':
143 {
144 'VCLinkerTool':
145 {
146 'TargetMachine': '1',
147 'AdditionalLibraryDirectories':
148 [
149 '<(windows_sdk_path)/Lib/win8/um/x86',
150 ],
151 },
152 'VCLibrarianTool':
153 {
Jamie Madill58f79422014-09-04 10:38:30 -0400154 'TargetMachine': '1',
Geoff Lang3cd50f72014-01-10 13:04:48 -0500155 'AdditionalLibraryDirectories':
156 [
157 '<(windows_sdk_path)/Lib/win8/um/x86',
158 ],
159 },
160 },
161 }, # x86_Base
162
163 'x64_Base':
164 {
165 'abstract': 1,
166 'msvs_configuration_platform': 'x64',
167 'msvs_settings':
168 {
169 'VCLinkerTool':
170 {
171 'TargetMachine': '17', # x86 - 64
172 'AdditionalLibraryDirectories':
173 [
174 '<(windows_sdk_path)/Lib/win8/um/x64',
175 ],
176 },
Geoff Langd095bda2014-04-07 14:21:14 -0400177 'VCLibrarianTool':
178 {
Geoff Lang3cd50f72014-01-10 13:04:48 -0500179 'AdditionalLibraryDirectories':
180 [
181 '<(windows_sdk_path)/Lib/win8/um/x64',
182 ],
183 },
184 },
185 }, # x64_Base
186
187 # Concrete configurations
188 'Debug':
189 {
190 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
191 },
192 'Release':
193 {
194 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
195 },
196 'conditions':
197 [
Geoff Lange7448342014-08-04 11:12:07 -0400198 [ 'OS == "win" and MSVS_VERSION != "2010e"',
Geoff Lang3cd50f72014-01-10 13:04:48 -0500199 {
200 'Debug_x64':
201 {
202 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
203 },
204 'Release_x64':
205 {
206 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
207 },
208 }],
Geoff Lang78059902013-10-11 14:33:01 -0400209 ],
Geoff Lang3cd50f72014-01-10 13:04:48 -0500210 }, # configurations
Geoff Lang3cd50f72014-01-10 13:04:48 -0500211 }, # target_defaults
212 'conditions':
213 [
214 ['OS == "win"',
215 {
216 'target_defaults':
217 {
218 'msvs_cygwin_dirs': ['../third_party/cygwin'],
219 },
Jamie Madill37f77d22014-04-30 16:10:13 -0400220 },
221 { # OS != win
222 'target_defaults':
223 {
224 'cflags': [ '-fPIC' ],
225 },
Geoff Lang78059902013-10-11 14:33:01 -0400226 }],
Geoff Lang3cd50f72014-01-10 13:04:48 -0500227 ['OS != "win" and OS != "mac"',
228 {
229 'target_defaults':
230 {
231 'cflags':
232 [
233 '-pthread',
234 '-fno-exceptions',
235 ],
236 'ldflags':
237 [
238 '-pthread',
239 ],
240 'configurations':
241 {
242 'Debug':
243 {
244 'variables':
245 {
246 'debug_optimize%': '0',
247 },
248 'defines':
249 [
250 '_DEBUG',
251 ],
252 'cflags':
253 [
254 '-O>(debug_optimize)',
255 '-g',
256 ],
257 }
258 },
259 },
260 }],
261 ['angle_code==1',
262 {
263 'target_defaults':
264 {
265 'conditions':
266 [
267 ['OS == "mac"',
268 {
269 'xcode_settings':
270 {
271 'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)']
272 },
273 }],
274 ['OS != "win" and OS != "mac"',
275 {
276 'cflags': ['<@(gcc_or_clang_warnings)']
277 }],
278 ]
279 }
280 }],
apatrick@chromium.org22eab922011-10-21 01:16:42 +0000281 ],
alokp@chromium.org29d56fb2010-04-06 15:42:22 +0000282}