blob: f9feb1c132ddcd07cf21e99044c42ed5f0fc5a37 [file] [log] [blame]
seanpaul@google.com1134f982011-09-15 14:24:33 +00001# conditions used in both common.gypi and skia.gyp in chromium
2#
3{
chudy@google.combbad34d2012-08-13 14:26:36 +00004 'defines': [
5 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)',
6 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +00007 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +00008 [ 'skia_gpu == 1',
bsalomon@google.comcf8fb1f2012-08-02 14:03:32 +00009 {
10 'defines': [
11 'SK_SUPPORT_GPU=1',
12 ],
13 }, {
14 'defines': [
15 'SK_SUPPORT_GPU=0',
16 ],
17 },
18 ],
zachr@google.comd6585682013-07-17 19:29:19 +000019 [ 'skia_opencl == 1',
20 {
21 'defines': [
22 'SK_SUPPORT_OPENCL=1',
23 ],
24 }, {
25 'defines': [
26 'SK_SUPPORT_OPENCL=0',
27 ],
28 },
29 ],
borenet@google.coma72aef82013-03-22 13:16:06 +000030 [ 'skia_os == "win"',
seanpaul@google.com1134f982011-09-15 14:24:33 +000031 {
32 'defines': [
33 'SK_BUILD_FOR_WIN32',
reed@google.comebbda762013-08-07 15:30:09 +000034 'SK_FONTHOST_USES_FONTMGR',
seanpaul@google.com1134f982011-09-15 14:24:33 +000035 'SK_IGNORE_STDINT_DOT_H',
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000036 '_CRT_SECURE_NO_WARNINGS',
senorblanco@chromium.org5f47a392012-07-12 00:34:39 +000037 'GR_GL_FUNCTION_TYPE=__stdcall',
seanpaul@google.com1134f982011-09-15 14:24:33 +000038 ],
39 'msvs_cygwin_shell': 0,
40 'msvs_settings': {
41 'VCCLCompilerTool': {
bsalomon@google.comb58a6392013-03-21 20:29:05 +000042 'WarningLevel': '3',
43 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
seanpaul@google.com1134f982011-09-15 14:24:33 +000044 'DebugInformationFormat': '3',
bsalomon@google.comb58a6392013-03-21 20:29:05 +000045 'ExceptionHandling': '0',
46 'AdditionalOptions': [ '/MP', ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000047 },
48 'VCLinkerTool': {
49 'AdditionalDependencies': [
50 'OpenGL32.lib',
51 'usp10.lib',
bungeman@google.comf51e1252013-06-05 18:35:22 +000052
53 # Prior to gyp r1584, the following were included automatically.
54 'kernel32.lib',
55 'gdi32.lib',
56 'winspool.lib',
57 'comdlg32.lib',
58 'advapi32.lib',
59 'shell32.lib',
60 'ole32.lib',
61 'oleaut32.lib',
62 'user32.lib',
63 'uuid.lib',
64 'odbc32.lib',
65 'odbccp32.lib',
bsalomon@google.combbba7842013-06-06 18:34:13 +000066 'DelayImp.lib',
seanpaul@google.com1134f982011-09-15 14:24:33 +000067 ],
68 },
69 },
70 'configurations': {
71 'Debug': {
72 'msvs_settings': {
73 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000074 'DebugInformationFormat': '4', # editAndContiue (/ZI)
seanpaul@google.com1134f982011-09-15 14:24:33 +000075 'Optimization': '0', # optimizeDisabled (/Od)
76 'PreprocessorDefinitions': ['_DEBUG'],
77 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000078 'RuntimeTypeInfo': 'false', # /GR-
seanpaul@google.com1134f982011-09-15 14:24:33 +000079 },
80 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000081 'GenerateDebugInformation': 'true', # /DEBUG
82 'LinkIncremental': '2', # /INCREMENTAL
seanpaul@google.com1134f982011-09-15 14:24:33 +000083 },
84 },
85 },
86 'Release': {
87 'msvs_settings': {
88 'VCCLCompilerTool': {
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000089 'DebugInformationFormat': '3', # programDatabase (/Zi)
commit-bot@chromium.org06b38642013-06-20 20:28:54 +000090 'Optimization': '<(skia_release_optimization_level)',
bsalomon@google.comd9718692013-04-22 14:56:50 +000091 'WholeProgramOptimization': 'true', #/GL
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000092 # Changing the floating point model requires rebaseling gm images
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000093 #'FloatingPointModel': '2', # fast (/fp:fast)
94 'FavorSizeOrSpeed': '1', # speed (/Ot)
seanpaul@google.com1134f982011-09-15 14:24:33 +000095 'PreprocessorDefinitions': ['NDEBUG'],
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000096 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000097 'EnableEnhancedInstructionSet': '2',# /arch:SSE2
98 'RuntimeTypeInfo': 'false', # /GR-
seanpaul@google.com1134f982011-09-15 14:24:33 +000099 },
100 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +0000101 'GenerateDebugInformation': 'true', # /DEBUG
bsalomon@google.comd9718692013-04-22 14:56:50 +0000102 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
seanpaul@google.com1134f982011-09-15 14:24:33 +0000103 },
bungeman@google.com983297e2011-10-03 19:36:51 +0000104 'VCLibrarianTool': {
bsalomon@google.comd9718692013-04-22 14:56:50 +0000105 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
bungeman@google.com983297e2011-10-03 19:36:51 +0000106 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000107 },
108 },
109 },
borenet@google.comb7961192012-08-20 18:58:26 +0000110 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +0000111 [ 'skia_arch_width == 64', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000112 'msvs_configuration_platform': 'x64',
borenet@google.coma72aef82013-03-22 13:16:06 +0000113 }],
114 [ 'skia_arch_width == 32', {
115 'msvs_configuration_platform': 'Win32',
116 }],
117 [ 'skia_warnings_as_errors', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000118 'msvs_settings': {
119 'VCCLCompilerTool': {
borenet@google.coma72aef82013-03-22 13:16:06 +0000120 'WarnAsError': 'true',
121 'AdditionalOptions': [
122 '/we4189', # initialized but unused var warning
123 ],
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000124 },
125 },
borenet@google.comb7961192012-08-20 18:58:26 +0000126 }],
commit-bot@chromium.org5a6c2d82013-06-14 17:10:09 +0000127 [ 'skia_win_exceptions', {
128 'msvs_settings': {
129 'VCCLCompilerTool': {
130 'AdditionalOptions': [
131 '/EHsc',
132 ],
133 },
134 },
135 }],
borenet@google.comb7961192012-08-20 18:58:26 +0000136 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000137 },
138 ],
139
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000140 # The following section is common to linux + derivatives and android
141 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]',
142 {
143 'conditions': [
144 [ 'skia_warnings_as_errors', {
145 'cflags': [
146 '-Werror',
147 ],
148 }],
149 [ 'skia_arch_type == "arm" and arm_thumb == 1', {
150 'cflags': [
151 '-mthumb',
152 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000153 # The --fix-cortex-a8 switch enables a link-time workaround for
154 # an erratum in certain Cortex-A8 processors. The workaround is
155 # enabled by default if you target the ARM v7-A arch profile.
156 # It can be enabled otherwise by specifying --fix-cortex-a8, or
157 # disabled unconditionally by specifying --no-fix-cortex-a8.
158 #
159 # The erratum only affects Thumb-2 code.
160 'conditions': [
161 [ 'arm_version < 7', {
162 'ldflags': [
163 '-Wl,--fix-cortex-a8',
164 ],
165 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000166 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000167 }],
168 [ 'skia_arch_type == "arm" and arm_version >= 7', {
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000169 'cflags': [
170 '-march=armv7-a',
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000171 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000172 'ldflags': [
173 '-march=armv7-a',
174 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000175 'conditions': [
176 [ 'arm_neon == 1', {
177 'defines': [
178 '__ARM_HAVE_NEON',
179 ],
180 'cflags': [
181 '-mfpu=neon',
182 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000183 }],
184 [ 'arm_neon_optional == 1', {
185 'defines': [
186 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
187 ],
188 }],
borenet@google.come2b90372013-07-11 18:46:30 +0000189 [ 'skia_os != "chromeos"', {
190 'cflags': [
191 '-mfloat-abi=softfp',
192 ],
193 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000194 ],
195 }],
196 ],
197 },
198 ],
199
200
borenet@google.com05d550e2013-06-11 15:52:19 +0000201 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000202 {
203 'defines': [
204 'SK_SAMPLES_FOR_X',
205 'SK_BUILD_FOR_UNIX',
206 ],
207 'configurations': {
mtklein@google.com1fb04e22013-09-13 19:32:43 +0000208 'Coverage': {
209 'cflags': ['-g --coverage'],
210 'ldflags': ['--coverage'],
211 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000212 'Debug': {
213 'cflags': ['-g']
214 },
215 'Release': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000216 'cflags': [
217 '-O<(skia_release_optimization_level)',
218 '-g',
219 ],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000220 'defines': [ 'NDEBUG' ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000221 },
222 },
bsalomon@google.comcadbcb82012-01-06 19:22:11 +0000223 'cflags': [
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000224 '-Wall',
225 '-Wextra',
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000226 # suppressions below here were added for clang
227 '-Wno-unused-parameter',
borenet@google.com47ae4b02013-08-21 18:02:50 +0000228 '-Wno-c++11-extensions',
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000229 ],
borenet@google.coma37a5172012-08-09 20:44:32 +0000230 'conditions' : [
zachr@google.com28c27c82013-06-20 17:15:05 +0000231 [ 'skia_shared_lib', {
232 'cflags': [
233 '-fPIC',
234 ],
235 'defines': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000236 'SKIA_DLL',
237 'SKIA_IMPLEMENTATION=1',
238 ],
239 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000240 [ 'skia_os == "nacl"', {
241 'defines': [
242 'SK_BUILD_FOR_NACL',
243 ],
244 'link_settings': {
245 'libraries': [
246 '-lppapi',
247 '-lppapi_cpp',
248 '-lnosys',
249 '-pthread',
250 ],
251 },
borenet@google.comcb9445d2013-08-19 18:26:04 +0000252 }, { # skia_os != "nacl"
253 'link_settings': {
254 'ldflags': [
255 '-lstdc++',
256 '-lm',
257 ],
258 },
borenet@google.com7158e6a2012-11-01 17:43:44 +0000259 }],
borenet@google.comcb9445d2013-08-19 18:26:04 +0000260 [ 'skia_os != "chromeos"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000261 'conditions': [
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000262 [ 'skia_arch_width == 64 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000263 'cflags': [
264 '-m64',
265 ],
266 'ldflags': [
267 '-m64',
268 ],
269 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000270 [ 'skia_arch_width == 32 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000271 'cflags': [
272 '-m32',
273 ],
274 'ldflags': [
275 '-m32',
276 ],
277 }],
278 ],
279 }],
borenet@google.com0d193092013-07-03 15:55:05 +0000280 [ 'skia_asan_build', {
281 'cflags': [
282 '-fsanitize=address',
283 '-fno-omit-frame-pointer',
284 ],
285 'ldflags': [
286 '-fsanitize=address',
287 ],
288 }],
borenet@google.com47ae4b02013-08-21 18:02:50 +0000289 [ 'skia_clang_build', {
290 'cflags': [
291 '-Wstring-conversion',
292 ],
293 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000294 ],
295 },
296 ],
297
borenet@google.coma72aef82013-03-22 13:16:06 +0000298 [ 'skia_os == "mac"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000299 {
humper@google.com522dbd22013-02-08 21:45:33 +0000300 'variables': {
301 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)',
302 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000303 'defines': [
304 'SK_BUILD_FOR_MAC',
reed@google.comebbda762013-08-07 15:30:09 +0000305 'SK_FONTHOST_USES_FONTMGR',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000306 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000307 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +0000308 [ 'skia_arch_width == 64', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000309 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000310 'ARCHS': ['x86_64'],
djsollen@google.come341cb32012-06-28 16:08:05 +0000311 },
312 }],
borenet@google.coma72aef82013-03-22 13:16:06 +0000313 [ 'skia_arch_width == 32', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000314 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000315 'ARCHS': ['i386'],
borenet@google.coma72aef82013-03-22 13:16:06 +0000316 },
317 }],
318 [ 'skia_warnings_as_errors', {
319 'xcode_settings': {
humper@google.comfe0d6802013-01-07 20:28:16 +0000320 'OTHER_CPLUSPLUSFLAGS': [
321 '-Werror',
commit-bot@chromium.orgfaa5ae42013-07-23 11:13:56 +0000322 '-Wall',
323 '-Wextra',
324 '-Wno-unused-parameter',
humper@google.comfe0d6802013-01-07 20:28:16 +0000325 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000326 },
327 }],
mtklein@google.com8d725b22013-07-24 16:20:05 +0000328# This old compiler is really bad at figuring out when things are uninitialized, so ignore it.
329 [ '<(mac_sdk)==10.6', {
330 'xcode_settings': {
331 'OTHER_CPLUSPLUSFLAGS': [
332 '-Wno-uninitialized',
333 ],
334 },
335 }],
djsollen@google.come341cb32012-06-28 16:08:05 +0000336 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000337 'configurations': {
338 'Debug': {
339 'xcode_settings': {
340 'GCC_OPTIMIZATION_LEVEL': '0',
341 },
342 },
reed@google.come05cc8e2011-10-10 14:19:40 +0000343 'Release': {
344 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000345 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
reed@google.come05cc8e2011-10-10 14:19:40 +0000346 },
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000347 'defines': [ 'NDEBUG' ],
reed@google.come05cc8e2011-10-10 14:19:40 +0000348 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000349 },
350 'xcode_settings': {
robertphillips@google.com02297652012-04-05 19:29:04 +0000351 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
humper@google.com522dbd22013-02-08 21:45:33 +0000352 'conditions': [
borenet@google.coma72aef82013-03-22 13:16:06 +0000353 [ 'skia_osx_sdkroot==""', {
humper@google.com522dbd22013-02-08 21:45:33 +0000354 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
355 }, {
356 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
357 }],
358 ],
reed@google.com0069aa52011-11-17 15:35:47 +0000359# trying to get this to work, but it needs clang I think...
360# 'WARNING_CFLAGS': '-Wexit-time-destructors',
mike@reedtribe.orge51755f2011-12-10 19:36:56 +0000361 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
caryclark@google.comb462a422012-06-06 12:12:28 +0000362 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
363 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES',
364 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'YES',
365 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
366 'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'YES',
367 'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
368 'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
369 'GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL': 'YES',
370 'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
371 'GCC_WARN_MISSING_PARENTHESES': 'YES',
372 'GCC_WARN_PROTOTYPE_CONVERSION': 'YES',
373 'GCC_WARN_SIGN_COMPARE': 'YES',
374 'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
375 'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
376 'GCC_WARN_UNUSED_FUNCTION': 'YES',
377 'GCC_WARN_UNUSED_LABEL': 'YES',
378 'GCC_WARN_UNUSED_VALUE': 'YES',
379 'GCC_WARN_UNUSED_VARIABLE': 'YES',
bungeman@google.com43b4ed52012-10-02 15:42:21 +0000380 'OTHER_CPLUSPLUSFLAGS': [
381 '-mssse3',
382 '-fvisibility=hidden',
383 '-fvisibility-inlines-hidden',
384 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000385 },
386 },
387 ],
388
borenet@google.coma72aef82013-03-22 13:16:06 +0000389 [ 'skia_os == "ios"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000390 {
391 'defines': [
392 'SK_BUILD_FOR_IOS',
393 ],
borenet@google.coma72aef82013-03-22 13:16:06 +0000394 'conditions' : [
395 [ 'skia_warnings_as_errors', {
396 'xcode_settings': {
397 'OTHER_CPLUSPLUSFLAGS': [
398 '-Werror',
399 ],
400 },
401 }],
402 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000403 'configurations': {
404 'Debug': {
405 'xcode_settings': {
406 'GCC_OPTIMIZATION_LEVEL': '0',
407 },
408 },
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000409 'Release': {
410 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000411 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000412 },
413 'defines': [ 'NDEBUG' ],
414 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000415 },
416 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000417 'ARCHS': ['armv6', 'armv7'],
caryclark@google.com867cbd82012-09-20 15:45:41 +0000418 'CODE_SIGNING_REQUIRED': 'NO',
419 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000420 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
caryclark@google.com867cbd82012-09-20 15:45:41 +0000421 'SDKROOT': 'iphoneos',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000422 'TARGETED_DEVICE_FAMILY': '1,2',
borenet@google.coma72aef82013-03-22 13:16:06 +0000423 'OTHER_CPLUSPLUSFLAGS': [
424 '-fvisibility=hidden',
425 '-fvisibility-inlines-hidden',
426 ],
bsalomon@google.com89dec582012-09-28 18:33:11 +0000427 'GCC_THUMB_SUPPORT': 'NO',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000428 },
429 },
430 ],
chudy@google.combbad34d2012-08-13 14:26:36 +0000431
borenet@google.coma72aef82013-03-22 13:16:06 +0000432 [ 'skia_os == "android"',
djsollen@google.com58629292011-11-03 13:08:29 +0000433 {
434 'defines': [
djsollen@google.com58629292011-11-03 13:08:29 +0000435 'SK_BUILD_FOR_ANDROID',
djsollen@google.com58629292011-11-03 13:08:29 +0000436 ],
437 'configurations': {
438 'Debug': {
439 'cflags': ['-g']
440 },
441 'Release': {
djsollen@google.combde506c2013-04-04 19:42:51 +0000442 'cflags': ['-O2'],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000443 'defines': [ 'NDEBUG' ],
djsollen@google.com58629292011-11-03 13:08:29 +0000444 },
445 },
446 'libraries': [
447 '-lstdc++',
448 '-lm',
djsollen@google.com318cf922011-11-08 19:03:43 +0000449 '-llog',
djsollen@google.com58629292011-11-03 13:08:29 +0000450 ],
djsollen@google.com44360bc2011-12-05 13:55:55 +0000451 'cflags': [
djsollen@google.comefbe8e92013-02-07 18:58:35 +0000452 '-Wall',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000453 '-fno-exceptions',
djsollen@google.comefbe8e92013-02-07 18:58:35 +0000454 '-fstrict-aliasing',
borenet@google.comde9ac142012-07-25 15:17:03 +0000455 '-fuse-ld=gold',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000456 ],
reed@google.come52d2912013-05-15 20:01:07 +0000457 'cflags_cc': [
458 '-fno-rtti',
459 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000460 'conditions': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000461 [ 'skia_shared_lib', {
462 'cflags': [
463 '-fPIC',
464 ],
465 'defines': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000466 'SKIA_DLL',
467 'SKIA_IMPLEMENTATION=1',
468 ],
469 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000470 [ 'skia_profile_enabled == 1', {
471 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'],
djsollen@google.com3839ca12011-11-03 17:31:41 +0000472 }],
chudy@google.combbad34d2012-08-13 14:26:36 +0000473 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000474 },
475 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000476
digit@google.com1771cbf2012-01-26 21:26:40 +0000477 # We can POD-style initialization of static mutexes to avoid generating
478 # static initializers if we're using a pthread-compatible thread interface.
479 [ 'skia_os != "win"', {
480 'defines': [
borenet@google.com7158e6a2012-11-01 17:43:44 +0000481 'SK_USE_POSIX_THREADS',
digit@google.com1771cbf2012-01-26 21:26:40 +0000482 ],
483 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000484 ], # end 'conditions'
caryclark@google.com4588ce82012-09-26 15:48:43 +0000485 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details
486 'xcode_settings': {
487 'SYMROOT': '<(DEPTH)/xcodebuild',
488 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000489}
490
491# Local Variables:
492# tab-width:2
493# indent-tabs-mode:nil
494# End:
495# vim: set expandtab tabstop=2 shiftwidth=2: