blob: e046b133d833027424c1347e2824f465b77b8dfd [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)',
reed@google.com1f1543f2012-09-12 21:08:33 +00006# 'SK_SUPPORT_HINTING_SCALE_FACTOR',
chudy@google.combbad34d2012-08-13 14:26:36 +00007 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +00008 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +00009 [ 'skia_gpu == 1',
bsalomon@google.comcf8fb1f2012-08-02 14:03:32 +000010 {
11 'defines': [
12 'SK_SUPPORT_GPU=1',
13 ],
14 }, {
15 'defines': [
16 'SK_SUPPORT_GPU=0',
17 ],
18 },
19 ],
zachr@google.comd6585682013-07-17 19:29:19 +000020 [ 'skia_opencl == 1',
21 {
22 'defines': [
23 'SK_SUPPORT_OPENCL=1',
24 ],
25 }, {
26 'defines': [
27 'SK_SUPPORT_OPENCL=0',
28 ],
29 },
30 ],
borenet@google.coma72aef82013-03-22 13:16:06 +000031 [ 'skia_os == "win"',
seanpaul@google.com1134f982011-09-15 14:24:33 +000032 {
33 'defines': [
34 'SK_BUILD_FOR_WIN32',
reed@google.comebbda762013-08-07 15:30:09 +000035 'SK_FONTHOST_USES_FONTMGR',
seanpaul@google.com1134f982011-09-15 14:24:33 +000036 'SK_IGNORE_STDINT_DOT_H',
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000037 '_CRT_SECURE_NO_WARNINGS',
senorblanco@chromium.org5f47a392012-07-12 00:34:39 +000038 'GR_GL_FUNCTION_TYPE=__stdcall',
seanpaul@google.com1134f982011-09-15 14:24:33 +000039 ],
40 'msvs_cygwin_shell': 0,
41 'msvs_settings': {
42 'VCCLCompilerTool': {
bsalomon@google.comb58a6392013-03-21 20:29:05 +000043 'WarningLevel': '3',
44 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
seanpaul@google.com1134f982011-09-15 14:24:33 +000045 'DebugInformationFormat': '3',
bsalomon@google.comb58a6392013-03-21 20:29:05 +000046 'ExceptionHandling': '0',
47 'AdditionalOptions': [ '/MP', ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000048 },
49 'VCLinkerTool': {
50 'AdditionalDependencies': [
51 'OpenGL32.lib',
52 'usp10.lib',
bungeman@google.comf51e1252013-06-05 18:35:22 +000053
54 # Prior to gyp r1584, the following were included automatically.
55 'kernel32.lib',
56 'gdi32.lib',
57 'winspool.lib',
58 'comdlg32.lib',
59 'advapi32.lib',
60 'shell32.lib',
61 'ole32.lib',
62 'oleaut32.lib',
63 'user32.lib',
64 'uuid.lib',
65 'odbc32.lib',
66 'odbccp32.lib',
bsalomon@google.combbba7842013-06-06 18:34:13 +000067 'DelayImp.lib',
seanpaul@google.com1134f982011-09-15 14:24:33 +000068 ],
69 },
70 },
71 'configurations': {
72 'Debug': {
73 'msvs_settings': {
74 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000075 'DebugInformationFormat': '4', # editAndContiue (/ZI)
seanpaul@google.com1134f982011-09-15 14:24:33 +000076 'Optimization': '0', # optimizeDisabled (/Od)
77 'PreprocessorDefinitions': ['_DEBUG'],
78 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000079 'RuntimeTypeInfo': 'false', # /GR-
seanpaul@google.com1134f982011-09-15 14:24:33 +000080 },
81 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000082 'GenerateDebugInformation': 'true', # /DEBUG
83 'LinkIncremental': '2', # /INCREMENTAL
seanpaul@google.com1134f982011-09-15 14:24:33 +000084 },
85 },
86 },
87 'Release': {
88 'msvs_settings': {
89 'VCCLCompilerTool': {
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000090 'DebugInformationFormat': '3', # programDatabase (/Zi)
commit-bot@chromium.org06b38642013-06-20 20:28:54 +000091 'Optimization': '<(skia_release_optimization_level)',
bsalomon@google.comd9718692013-04-22 14:56:50 +000092 'WholeProgramOptimization': 'true', #/GL
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000093 # Changing the floating point model requires rebaseling gm images
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000094 #'FloatingPointModel': '2', # fast (/fp:fast)
95 'FavorSizeOrSpeed': '1', # speed (/Ot)
seanpaul@google.com1134f982011-09-15 14:24:33 +000096 'PreprocessorDefinitions': ['NDEBUG'],
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000097 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000098 'EnableEnhancedInstructionSet': '2',# /arch:SSE2
99 'RuntimeTypeInfo': 'false', # /GR-
seanpaul@google.com1134f982011-09-15 14:24:33 +0000100 },
101 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +0000102 'GenerateDebugInformation': 'true', # /DEBUG
bsalomon@google.comd9718692013-04-22 14:56:50 +0000103 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
seanpaul@google.com1134f982011-09-15 14:24:33 +0000104 },
bungeman@google.com983297e2011-10-03 19:36:51 +0000105 'VCLibrarianTool': {
bsalomon@google.comd9718692013-04-22 14:56:50 +0000106 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
bungeman@google.com983297e2011-10-03 19:36:51 +0000107 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000108 },
109 },
110 },
borenet@google.comb7961192012-08-20 18:58:26 +0000111 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +0000112 [ 'skia_arch_width == 64', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000113 'msvs_configuration_platform': 'x64',
borenet@google.coma72aef82013-03-22 13:16:06 +0000114 }],
115 [ 'skia_arch_width == 32', {
116 'msvs_configuration_platform': 'Win32',
117 }],
118 [ 'skia_warnings_as_errors', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000119 'msvs_settings': {
120 'VCCLCompilerTool': {
borenet@google.coma72aef82013-03-22 13:16:06 +0000121 'WarnAsError': 'true',
122 'AdditionalOptions': [
123 '/we4189', # initialized but unused var warning
124 ],
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000125 },
126 },
borenet@google.comb7961192012-08-20 18:58:26 +0000127 }],
commit-bot@chromium.org5a6c2d82013-06-14 17:10:09 +0000128 [ 'skia_win_exceptions', {
129 'msvs_settings': {
130 'VCCLCompilerTool': {
131 'AdditionalOptions': [
132 '/EHsc',
133 ],
134 },
135 },
136 }],
borenet@google.comb7961192012-08-20 18:58:26 +0000137 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000138 },
139 ],
140
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000141 # The following section is common to linux + derivatives and android
142 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]',
143 {
144 'conditions': [
145 [ 'skia_warnings_as_errors', {
146 'cflags': [
147 '-Werror',
148 ],
149 }],
150 [ 'skia_arch_type == "arm" and arm_thumb == 1', {
151 'cflags': [
152 '-mthumb',
153 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000154 # The --fix-cortex-a8 switch enables a link-time workaround for
155 # an erratum in certain Cortex-A8 processors. The workaround is
156 # enabled by default if you target the ARM v7-A arch profile.
157 # It can be enabled otherwise by specifying --fix-cortex-a8, or
158 # disabled unconditionally by specifying --no-fix-cortex-a8.
159 #
160 # The erratum only affects Thumb-2 code.
161 'conditions': [
162 [ 'arm_version < 7', {
163 'ldflags': [
164 '-Wl,--fix-cortex-a8',
165 ],
166 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000167 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000168 }],
169 [ 'skia_arch_type == "arm" and arm_version >= 7', {
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000170 'cflags': [
171 '-march=armv7-a',
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000172 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000173 'ldflags': [
174 '-march=armv7-a',
175 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000176 'conditions': [
177 [ 'arm_neon == 1', {
178 'defines': [
179 '__ARM_HAVE_NEON',
180 ],
181 'cflags': [
182 '-mfpu=neon',
183 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000184 }],
185 [ 'arm_neon_optional == 1', {
186 'defines': [
187 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
188 ],
189 }],
borenet@google.come2b90372013-07-11 18:46:30 +0000190 [ 'skia_os != "chromeos"', {
191 'cflags': [
192 '-mfloat-abi=softfp',
193 ],
194 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000195 ],
196 }],
197 ],
198 },
199 ],
200
201
borenet@google.com05d550e2013-06-11 15:52:19 +0000202 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000203 {
204 'defines': [
205 'SK_SAMPLES_FOR_X',
206 'SK_BUILD_FOR_UNIX',
207 ],
208 'configurations': {
209 'Debug': {
210 'cflags': ['-g']
211 },
212 'Release': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000213 'cflags': [
214 '-O<(skia_release_optimization_level)',
215 '-g',
216 ],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000217 'defines': [ 'NDEBUG' ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000218 },
219 },
bsalomon@google.comcadbcb82012-01-06 19:22:11 +0000220 'cflags': [
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000221 '-Wall',
222 '-Wextra',
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000223 # suppressions below here were added for clang
224 '-Wno-unused-parameter',
225 '-Wno-c++11-extensions'
226 ],
borenet@google.coma37a5172012-08-09 20:44:32 +0000227 'conditions' : [
zachr@google.com28c27c82013-06-20 17:15:05 +0000228 [ 'skia_shared_lib', {
229 'cflags': [
230 '-fPIC',
231 ],
232 'defines': [
233 'GR_DLL=1',
234 'GR_IMPLEMENTATION=1',
235 'SKIA_DLL',
236 'SKIA_IMPLEMENTATION=1',
237 ],
238 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000239 [ 'skia_os == "nacl"', {
240 'defines': [
241 'SK_BUILD_FOR_NACL',
242 ],
243 'link_settings': {
244 'libraries': [
245 '-lppapi',
246 '-lppapi_cpp',
247 '-lnosys',
248 '-pthread',
249 ],
250 },
borenet@google.com7158e6a2012-11-01 17:43:44 +0000251 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000252 [ 'skia_os == "chromeos"', {
253 'ldflags': [
borenet@google.com05d550e2013-06-11 15:52:19 +0000254 '-lstdc++',
255 '-lm',
256 ],
257 }, {
258 'conditions': [
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000259 [ 'skia_arch_width == 64 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000260 'cflags': [
261 '-m64',
262 ],
263 'ldflags': [
264 '-m64',
265 ],
266 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000267 [ 'skia_arch_width == 32 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000268 'cflags': [
269 '-m32',
270 ],
271 'ldflags': [
272 '-m32',
273 ],
274 }],
275 ],
276 }],
borenet@google.com0d193092013-07-03 15:55:05 +0000277 [ 'skia_asan_build', {
278 'cflags': [
279 '-fsanitize=address',
280 '-fno-omit-frame-pointer',
281 ],
282 'ldflags': [
283 '-fsanitize=address',
284 ],
285 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000286 ],
287 },
288 ],
289
borenet@google.coma72aef82013-03-22 13:16:06 +0000290 [ 'skia_os == "mac"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000291 {
humper@google.com522dbd22013-02-08 21:45:33 +0000292 'variables': {
293 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)',
294 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000295 'defines': [
296 'SK_BUILD_FOR_MAC',
reed@google.comebbda762013-08-07 15:30:09 +0000297 'SK_FONTHOST_USES_FONTMGR',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000298 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000299 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +0000300 [ 'skia_arch_width == 64', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000301 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000302 'ARCHS': ['x86_64'],
djsollen@google.come341cb32012-06-28 16:08:05 +0000303 },
304 }],
borenet@google.coma72aef82013-03-22 13:16:06 +0000305 [ 'skia_arch_width == 32', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000306 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000307 'ARCHS': ['i386'],
borenet@google.coma72aef82013-03-22 13:16:06 +0000308 },
309 }],
310 [ 'skia_warnings_as_errors', {
311 'xcode_settings': {
humper@google.comfe0d6802013-01-07 20:28:16 +0000312 'OTHER_CPLUSPLUSFLAGS': [
313 '-Werror',
commit-bot@chromium.orgfaa5ae42013-07-23 11:13:56 +0000314 '-Wall',
315 '-Wextra',
316 '-Wno-unused-parameter',
humper@google.comfe0d6802013-01-07 20:28:16 +0000317 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000318 },
319 }],
mtklein@google.com8d725b22013-07-24 16:20:05 +0000320# This old compiler is really bad at figuring out when things are uninitialized, so ignore it.
321 [ '<(mac_sdk)==10.6', {
322 'xcode_settings': {
323 'OTHER_CPLUSPLUSFLAGS': [
324 '-Wno-uninitialized',
325 ],
326 },
327 }],
djsollen@google.come341cb32012-06-28 16:08:05 +0000328 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000329 'configurations': {
330 'Debug': {
331 'xcode_settings': {
332 'GCC_OPTIMIZATION_LEVEL': '0',
333 },
334 },
reed@google.come05cc8e2011-10-10 14:19:40 +0000335 'Release': {
336 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000337 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
reed@google.come05cc8e2011-10-10 14:19:40 +0000338 },
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000339 'defines': [ 'NDEBUG' ],
reed@google.come05cc8e2011-10-10 14:19:40 +0000340 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000341 },
342 'xcode_settings': {
robertphillips@google.com02297652012-04-05 19:29:04 +0000343 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
humper@google.com522dbd22013-02-08 21:45:33 +0000344 'conditions': [
borenet@google.coma72aef82013-03-22 13:16:06 +0000345 [ 'skia_osx_sdkroot==""', {
humper@google.com522dbd22013-02-08 21:45:33 +0000346 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
347 }, {
348 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
349 }],
350 ],
reed@google.com0069aa52011-11-17 15:35:47 +0000351# trying to get this to work, but it needs clang I think...
352# 'WARNING_CFLAGS': '-Wexit-time-destructors',
mike@reedtribe.orge51755f2011-12-10 19:36:56 +0000353 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
caryclark@google.comb462a422012-06-06 12:12:28 +0000354 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
355 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES',
356 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'YES',
357 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
358 'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'YES',
359 'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
360 'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
361 'GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL': 'YES',
362 'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
363 'GCC_WARN_MISSING_PARENTHESES': 'YES',
364 'GCC_WARN_PROTOTYPE_CONVERSION': 'YES',
365 'GCC_WARN_SIGN_COMPARE': 'YES',
366 'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
367 'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
368 'GCC_WARN_UNUSED_FUNCTION': 'YES',
369 'GCC_WARN_UNUSED_LABEL': 'YES',
370 'GCC_WARN_UNUSED_VALUE': 'YES',
371 'GCC_WARN_UNUSED_VARIABLE': 'YES',
bungeman@google.com43b4ed52012-10-02 15:42:21 +0000372 'OTHER_CPLUSPLUSFLAGS': [
373 '-mssse3',
374 '-fvisibility=hidden',
375 '-fvisibility-inlines-hidden',
376 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000377 },
378 },
379 ],
380
borenet@google.coma72aef82013-03-22 13:16:06 +0000381 [ 'skia_os == "ios"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000382 {
383 'defines': [
384 'SK_BUILD_FOR_IOS',
385 ],
borenet@google.coma72aef82013-03-22 13:16:06 +0000386 'conditions' : [
387 [ 'skia_warnings_as_errors', {
388 'xcode_settings': {
389 'OTHER_CPLUSPLUSFLAGS': [
390 '-Werror',
391 ],
392 },
393 }],
394 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000395 'configurations': {
396 'Debug': {
397 'xcode_settings': {
398 'GCC_OPTIMIZATION_LEVEL': '0',
399 },
400 },
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000401 'Release': {
402 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000403 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000404 },
405 'defines': [ 'NDEBUG' ],
406 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000407 },
408 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000409 'ARCHS': ['armv6', 'armv7'],
caryclark@google.com867cbd82012-09-20 15:45:41 +0000410 'CODE_SIGNING_REQUIRED': 'NO',
411 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000412 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
caryclark@google.com867cbd82012-09-20 15:45:41 +0000413 'SDKROOT': 'iphoneos',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000414 'TARGETED_DEVICE_FAMILY': '1,2',
borenet@google.coma72aef82013-03-22 13:16:06 +0000415 'OTHER_CPLUSPLUSFLAGS': [
416 '-fvisibility=hidden',
417 '-fvisibility-inlines-hidden',
418 ],
bsalomon@google.com89dec582012-09-28 18:33:11 +0000419 'GCC_THUMB_SUPPORT': 'NO',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000420 },
421 },
422 ],
chudy@google.combbad34d2012-08-13 14:26:36 +0000423
borenet@google.coma72aef82013-03-22 13:16:06 +0000424 [ 'skia_os == "android"',
djsollen@google.com58629292011-11-03 13:08:29 +0000425 {
426 'defines': [
djsollen@google.com58629292011-11-03 13:08:29 +0000427 'SK_BUILD_FOR_ANDROID',
djsollen@google.com58629292011-11-03 13:08:29 +0000428 ],
429 'configurations': {
430 'Debug': {
431 'cflags': ['-g']
432 },
433 'Release': {
djsollen@google.combde506c2013-04-04 19:42:51 +0000434 'cflags': ['-O2'],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000435 'defines': [ 'NDEBUG' ],
djsollen@google.com58629292011-11-03 13:08:29 +0000436 },
437 },
438 'libraries': [
439 '-lstdc++',
440 '-lm',
djsollen@google.com318cf922011-11-08 19:03:43 +0000441 '-llog',
djsollen@google.com58629292011-11-03 13:08:29 +0000442 ],
djsollen@google.com44360bc2011-12-05 13:55:55 +0000443 'cflags': [
djsollen@google.comefbe8e92013-02-07 18:58:35 +0000444 '-Wall',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000445 '-fno-exceptions',
djsollen@google.comefbe8e92013-02-07 18:58:35 +0000446 '-fstrict-aliasing',
borenet@google.comde9ac142012-07-25 15:17:03 +0000447 '-fuse-ld=gold',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000448 ],
reed@google.come52d2912013-05-15 20:01:07 +0000449 'cflags_cc': [
450 '-fno-rtti',
451 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000452 'conditions': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000453 [ 'skia_shared_lib', {
454 'cflags': [
455 '-fPIC',
456 ],
457 'defines': [
458 'GR_DLL=1',
459 'GR_IMPLEMENTATION=1',
460 'SKIA_DLL',
461 'SKIA_IMPLEMENTATION=1',
462 ],
463 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000464 [ 'skia_profile_enabled == 1', {
465 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'],
djsollen@google.com3839ca12011-11-03 17:31:41 +0000466 }],
chudy@google.combbad34d2012-08-13 14:26:36 +0000467 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000468 },
469 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000470
digit@google.com1771cbf2012-01-26 21:26:40 +0000471 # We can POD-style initialization of static mutexes to avoid generating
472 # static initializers if we're using a pthread-compatible thread interface.
473 [ 'skia_os != "win"', {
474 'defines': [
borenet@google.com7158e6a2012-11-01 17:43:44 +0000475 'SK_USE_POSIX_THREADS',
digit@google.com1771cbf2012-01-26 21:26:40 +0000476 ],
477 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000478 ], # end 'conditions'
caryclark@google.com4588ce82012-09-26 15:48:43 +0000479 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details
480 'xcode_settings': {
481 'SYMROOT': '<(DEPTH)/xcodebuild',
482 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000483}
484
485# Local Variables:
486# tab-width:2
487# indent-tabs-mode:nil
488# End:
489# vim: set expandtab tabstop=2 shiftwidth=2: