blob: d6154caee3a839a082e46fcd5b17e553f4f404cd [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',
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000035 '_CRT_SECURE_NO_WARNINGS',
senorblanco@chromium.org5f47a392012-07-12 00:34:39 +000036 'GR_GL_FUNCTION_TYPE=__stdcall',
seanpaul@google.com1134f982011-09-15 14:24:33 +000037 ],
38 'msvs_cygwin_shell': 0,
39 'msvs_settings': {
40 'VCCLCompilerTool': {
bsalomon@google.comb58a6392013-03-21 20:29:05 +000041 'WarningLevel': '3',
42 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
seanpaul@google.com1134f982011-09-15 14:24:33 +000043 'DebugInformationFormat': '3',
bsalomon@google.comb58a6392013-03-21 20:29:05 +000044 'ExceptionHandling': '0',
45 'AdditionalOptions': [ '/MP', ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000046 },
47 'VCLinkerTool': {
48 'AdditionalDependencies': [
49 'OpenGL32.lib',
50 'usp10.lib',
bungeman@google.comf51e1252013-06-05 18:35:22 +000051
52 # Prior to gyp r1584, the following were included automatically.
53 'kernel32.lib',
54 'gdi32.lib',
55 'winspool.lib',
56 'comdlg32.lib',
57 'advapi32.lib',
58 'shell32.lib',
59 'ole32.lib',
60 'oleaut32.lib',
61 'user32.lib',
62 'uuid.lib',
63 'odbc32.lib',
64 'odbccp32.lib',
bsalomon@google.combbba7842013-06-06 18:34:13 +000065 'DelayImp.lib',
seanpaul@google.com1134f982011-09-15 14:24:33 +000066 ],
67 },
68 },
69 'configurations': {
70 'Debug': {
71 'msvs_settings': {
72 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000073 'DebugInformationFormat': '4', # editAndContiue (/ZI)
seanpaul@google.com1134f982011-09-15 14:24:33 +000074 'Optimization': '0', # optimizeDisabled (/Od)
75 'PreprocessorDefinitions': ['_DEBUG'],
76 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000077 'RuntimeTypeInfo': 'false', # /GR-
seanpaul@google.com1134f982011-09-15 14:24:33 +000078 },
79 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000080 'GenerateDebugInformation': 'true', # /DEBUG
81 'LinkIncremental': '2', # /INCREMENTAL
seanpaul@google.com1134f982011-09-15 14:24:33 +000082 },
83 },
84 },
85 'Release': {
86 'msvs_settings': {
87 'VCCLCompilerTool': {
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000088 'DebugInformationFormat': '3', # programDatabase (/Zi)
commit-bot@chromium.org06b38642013-06-20 20:28:54 +000089 'Optimization': '<(skia_release_optimization_level)',
bsalomon@google.comd9718692013-04-22 14:56:50 +000090 'WholeProgramOptimization': 'true', #/GL
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000091 # Changing the floating point model requires rebaseling gm images
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000092 #'FloatingPointModel': '2', # fast (/fp:fast)
93 'FavorSizeOrSpeed': '1', # speed (/Ot)
seanpaul@google.com1134f982011-09-15 14:24:33 +000094 'PreprocessorDefinitions': ['NDEBUG'],
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000095 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000096 'EnableEnhancedInstructionSet': '2',# /arch:SSE2
97 'RuntimeTypeInfo': 'false', # /GR-
seanpaul@google.com1134f982011-09-15 14:24:33 +000098 },
99 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +0000100 'GenerateDebugInformation': 'true', # /DEBUG
bsalomon@google.comd9718692013-04-22 14:56:50 +0000101 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
seanpaul@google.com1134f982011-09-15 14:24:33 +0000102 },
bungeman@google.com983297e2011-10-03 19:36:51 +0000103 'VCLibrarianTool': {
bsalomon@google.comd9718692013-04-22 14:56:50 +0000104 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
bungeman@google.com983297e2011-10-03 19:36:51 +0000105 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000106 },
107 },
108 },
borenet@google.comb7961192012-08-20 18:58:26 +0000109 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +0000110 [ 'skia_arch_width == 64', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000111 'msvs_configuration_platform': 'x64',
borenet@google.coma72aef82013-03-22 13:16:06 +0000112 }],
113 [ 'skia_arch_width == 32', {
114 'msvs_configuration_platform': 'Win32',
115 }],
116 [ 'skia_warnings_as_errors', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000117 'msvs_settings': {
118 'VCCLCompilerTool': {
borenet@google.coma72aef82013-03-22 13:16:06 +0000119 'WarnAsError': 'true',
120 'AdditionalOptions': [
121 '/we4189', # initialized but unused var warning
122 ],
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000123 },
124 },
borenet@google.comb7961192012-08-20 18:58:26 +0000125 }],
commit-bot@chromium.org5a6c2d82013-06-14 17:10:09 +0000126 [ 'skia_win_exceptions', {
127 'msvs_settings': {
128 'VCCLCompilerTool': {
129 'AdditionalOptions': [
130 '/EHsc',
131 ],
132 },
133 },
134 }],
borenet@google.comb7961192012-08-20 18:58:26 +0000135 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000136 },
137 ],
138
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000139 # The following section is common to linux + derivatives and android
140 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]',
141 {
142 'conditions': [
143 [ 'skia_warnings_as_errors', {
144 'cflags': [
145 '-Werror',
146 ],
147 }],
148 [ 'skia_arch_type == "arm" and arm_thumb == 1', {
149 'cflags': [
150 '-mthumb',
151 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000152 # The --fix-cortex-a8 switch enables a link-time workaround for
153 # an erratum in certain Cortex-A8 processors. The workaround is
154 # enabled by default if you target the ARM v7-A arch profile.
155 # It can be enabled otherwise by specifying --fix-cortex-a8, or
156 # disabled unconditionally by specifying --no-fix-cortex-a8.
157 #
158 # The erratum only affects Thumb-2 code.
159 'conditions': [
160 [ 'arm_version < 7', {
161 'ldflags': [
162 '-Wl,--fix-cortex-a8',
163 ],
164 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000165 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000166 }],
167 [ 'skia_arch_type == "arm" and arm_version >= 7', {
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000168 'cflags': [
169 '-march=armv7-a',
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000170 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000171 'ldflags': [
172 '-march=armv7-a',
173 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000174 'conditions': [
175 [ 'arm_neon == 1', {
176 'defines': [
177 '__ARM_HAVE_NEON',
178 ],
179 'cflags': [
180 '-mfpu=neon',
181 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000182 }],
183 [ 'arm_neon_optional == 1', {
184 'defines': [
185 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
186 ],
187 }],
borenet@google.come2b90372013-07-11 18:46:30 +0000188 [ 'skia_os != "chromeos"', {
189 'cflags': [
190 '-mfloat-abi=softfp',
191 ],
192 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000193 ],
194 }],
195 ],
196 },
197 ],
198
199
borenet@google.com05d550e2013-06-11 15:52:19 +0000200 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000201 {
202 'defines': [
203 'SK_SAMPLES_FOR_X',
204 'SK_BUILD_FOR_UNIX',
205 ],
206 'configurations': {
mtklein@google.com1fb04e22013-09-13 19:32:43 +0000207 'Coverage': {
208 'cflags': ['-g --coverage'],
209 'ldflags': ['--coverage'],
210 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000211 'Debug': {
212 'cflags': ['-g']
213 },
214 'Release': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000215 'cflags': [
216 '-O<(skia_release_optimization_level)',
217 '-g',
218 ],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000219 'defines': [ 'NDEBUG' ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000220 },
221 },
bsalomon@google.comcadbcb82012-01-06 19:22:11 +0000222 'cflags': [
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000223 '-Wall',
224 '-Wextra',
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000225 # suppressions below here were added for clang
226 '-Wno-unused-parameter',
borenet@google.com47ae4b02013-08-21 18:02:50 +0000227 '-Wno-c++11-extensions',
bsalomon@google.com31648eb2011-11-23 15:01:08 +0000228 ],
borenet@google.coma37a5172012-08-09 20:44:32 +0000229 'conditions' : [
zachr@google.com28c27c82013-06-20 17:15:05 +0000230 [ 'skia_shared_lib', {
231 'cflags': [
232 '-fPIC',
233 ],
234 'defines': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000235 '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.comcb9445d2013-08-19 18:26:04 +0000251 }, { # skia_os != "nacl"
252 'link_settings': {
253 'ldflags': [
254 '-lstdc++',
255 '-lm',
256 ],
257 },
borenet@google.com7158e6a2012-11-01 17:43:44 +0000258 }],
borenet@google.comcb9445d2013-08-19 18:26:04 +0000259 [ 'skia_os != "chromeos"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000260 'conditions': [
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000261 [ 'skia_arch_width == 64 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000262 'cflags': [
263 '-m64',
264 ],
265 'ldflags': [
266 '-m64',
267 ],
268 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000269 [ 'skia_arch_width == 32 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000270 'cflags': [
271 '-m32',
272 ],
273 'ldflags': [
274 '-m32',
275 ],
276 }],
277 ],
278 }],
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000279 # Enable asan, tsan, etc.
280 [ 'skia_sanitizer', {
borenet@google.com0d193092013-07-03 15:55:05 +0000281 'cflags': [
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000282 '-fsanitize=<(skia_sanitizer)',
borenet@google.com0d193092013-07-03 15:55:05 +0000283 '-fno-omit-frame-pointer',
284 ],
285 'ldflags': [
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000286 '-fsanitize=<(skia_sanitizer)',
bungeman@google.com1435f9f2013-09-25 22:39:22 +0000287 ],
mtklein@google.com3a19fb52013-10-09 16:12:23 +0000288 'conditions' : [
289 [ 'skia_sanitizer == "thread"', {
290 'defines': [ 'DYNAMIC_ANNOTATIONS_ENABLED=1' ],
bungeman@google.com0fbe01f2013-10-10 17:24:17 +0000291 'cflags': [ '-fPIC' ],
bungeman@google.com27d4ffe2013-10-10 17:09:49 +0000292 'target_conditions': [
293 [ '_type == "executable"', {
294 'cflags': [ '-fPIE' ],
295 'ldflags': [ '-pie' ],
296 }],
297 ],
mtklein@google.com3a19fb52013-10-09 16:12:23 +0000298 }],
299 ],
bungeman@google.com1435f9f2013-09-25 22:39:22 +0000300 }],
borenet@google.com47ae4b02013-08-21 18:02:50 +0000301 [ 'skia_clang_build', {
302 'cflags': [
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000303 # Extra warnings we like but that only Clang knows about.
borenet@google.com47ae4b02013-08-21 18:02:50 +0000304 '-Wstring-conversion',
305 ],
306 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000307 ],
308 },
309 ],
310
borenet@google.coma72aef82013-03-22 13:16:06 +0000311 [ 'skia_os == "mac"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000312 {
humper@google.com522dbd22013-02-08 21:45:33 +0000313 'variables': {
314 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)',
315 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000316 'defines': [
317 'SK_BUILD_FOR_MAC',
reed@google.comebbda762013-08-07 15:30:09 +0000318 'SK_FONTHOST_USES_FONTMGR',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000319 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000320 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +0000321 [ 'skia_arch_width == 64', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000322 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000323 'ARCHS': ['x86_64'],
djsollen@google.come341cb32012-06-28 16:08:05 +0000324 },
325 }],
borenet@google.coma72aef82013-03-22 13:16:06 +0000326 [ 'skia_arch_width == 32', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000327 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000328 'ARCHS': ['i386'],
borenet@google.coma72aef82013-03-22 13:16:06 +0000329 },
330 }],
331 [ 'skia_warnings_as_errors', {
332 'xcode_settings': {
humper@google.comfe0d6802013-01-07 20:28:16 +0000333 'OTHER_CPLUSPLUSFLAGS': [
334 '-Werror',
commit-bot@chromium.orgfaa5ae42013-07-23 11:13:56 +0000335 '-Wall',
336 '-Wextra',
337 '-Wno-unused-parameter',
humper@google.comfe0d6802013-01-07 20:28:16 +0000338 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000339 },
340 }],
mtklein@google.com8d725b22013-07-24 16:20:05 +0000341# This old compiler is really bad at figuring out when things are uninitialized, so ignore it.
342 [ '<(mac_sdk)==10.6', {
343 'xcode_settings': {
344 'OTHER_CPLUSPLUSFLAGS': [
345 '-Wno-uninitialized',
346 ],
347 },
348 }],
djsollen@google.come341cb32012-06-28 16:08:05 +0000349 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000350 'configurations': {
351 'Debug': {
352 'xcode_settings': {
353 'GCC_OPTIMIZATION_LEVEL': '0',
354 },
355 },
reed@google.come05cc8e2011-10-10 14:19:40 +0000356 'Release': {
357 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000358 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
reed@google.come05cc8e2011-10-10 14:19:40 +0000359 },
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000360 'defines': [ 'NDEBUG' ],
reed@google.come05cc8e2011-10-10 14:19:40 +0000361 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000362 },
363 'xcode_settings': {
robertphillips@google.com02297652012-04-05 19:29:04 +0000364 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
humper@google.com522dbd22013-02-08 21:45:33 +0000365 'conditions': [
borenet@google.coma72aef82013-03-22 13:16:06 +0000366 [ 'skia_osx_sdkroot==""', {
humper@google.com522dbd22013-02-08 21:45:33 +0000367 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
368 }, {
369 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
370 }],
371 ],
reed@google.com0069aa52011-11-17 15:35:47 +0000372# trying to get this to work, but it needs clang I think...
373# 'WARNING_CFLAGS': '-Wexit-time-destructors',
mike@reedtribe.orge51755f2011-12-10 19:36:56 +0000374 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
caryclark@google.comb462a422012-06-06 12:12:28 +0000375 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
376 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES',
377 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'YES',
378 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
379 'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'YES',
380 'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
381 'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
382 'GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL': 'YES',
383 'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
384 'GCC_WARN_MISSING_PARENTHESES': 'YES',
385 'GCC_WARN_PROTOTYPE_CONVERSION': 'YES',
386 'GCC_WARN_SIGN_COMPARE': 'YES',
387 'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
388 'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
389 'GCC_WARN_UNUSED_FUNCTION': 'YES',
390 'GCC_WARN_UNUSED_LABEL': 'YES',
391 'GCC_WARN_UNUSED_VALUE': 'YES',
392 'GCC_WARN_UNUSED_VARIABLE': 'YES',
bungeman@google.com43b4ed52012-10-02 15:42:21 +0000393 'OTHER_CPLUSPLUSFLAGS': [
394 '-mssse3',
395 '-fvisibility=hidden',
396 '-fvisibility-inlines-hidden',
397 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000398 },
399 },
400 ],
401
borenet@google.coma72aef82013-03-22 13:16:06 +0000402 [ 'skia_os == "ios"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000403 {
404 'defines': [
405 'SK_BUILD_FOR_IOS',
406 ],
borenet@google.coma72aef82013-03-22 13:16:06 +0000407 'conditions' : [
408 [ 'skia_warnings_as_errors', {
409 'xcode_settings': {
410 'OTHER_CPLUSPLUSFLAGS': [
411 '-Werror',
412 ],
413 },
414 }],
415 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000416 'configurations': {
417 'Debug': {
418 'xcode_settings': {
419 'GCC_OPTIMIZATION_LEVEL': '0',
420 },
421 },
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000422 'Release': {
423 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000424 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000425 },
426 'defines': [ 'NDEBUG' ],
427 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000428 },
429 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000430 'ARCHS': ['armv6', 'armv7'],
caryclark@google.com867cbd82012-09-20 15:45:41 +0000431 'CODE_SIGNING_REQUIRED': 'NO',
432 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000433 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
caryclark@google.com867cbd82012-09-20 15:45:41 +0000434 'SDKROOT': 'iphoneos',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000435 'TARGETED_DEVICE_FAMILY': '1,2',
borenet@google.coma72aef82013-03-22 13:16:06 +0000436 'OTHER_CPLUSPLUSFLAGS': [
437 '-fvisibility=hidden',
438 '-fvisibility-inlines-hidden',
439 ],
bsalomon@google.com89dec582012-09-28 18:33:11 +0000440 'GCC_THUMB_SUPPORT': 'NO',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000441 },
442 },
443 ],
chudy@google.combbad34d2012-08-13 14:26:36 +0000444
borenet@google.coma72aef82013-03-22 13:16:06 +0000445 [ 'skia_os == "android"',
djsollen@google.com58629292011-11-03 13:08:29 +0000446 {
447 'defines': [
djsollen@google.com58629292011-11-03 13:08:29 +0000448 'SK_BUILD_FOR_ANDROID',
djsollen@google.com58629292011-11-03 13:08:29 +0000449 ],
450 'configurations': {
451 'Debug': {
452 'cflags': ['-g']
453 },
454 'Release': {
djsollen@google.combde506c2013-04-04 19:42:51 +0000455 'cflags': ['-O2'],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000456 'defines': [ 'NDEBUG' ],
djsollen@google.com58629292011-11-03 13:08:29 +0000457 },
458 },
459 'libraries': [
460 '-lstdc++',
461 '-lm',
djsollen@google.com318cf922011-11-08 19:03:43 +0000462 '-llog',
djsollen@google.com58629292011-11-03 13:08:29 +0000463 ],
djsollen@google.com44360bc2011-12-05 13:55:55 +0000464 'cflags': [
djsollen@google.comefbe8e92013-02-07 18:58:35 +0000465 '-Wall',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000466 '-fno-exceptions',
djsollen@google.comefbe8e92013-02-07 18:58:35 +0000467 '-fstrict-aliasing',
borenet@google.comde9ac142012-07-25 15:17:03 +0000468 '-fuse-ld=gold',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000469 ],
reed@google.come52d2912013-05-15 20:01:07 +0000470 'cflags_cc': [
471 '-fno-rtti',
472 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000473 'conditions': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000474 [ 'skia_shared_lib', {
475 'cflags': [
476 '-fPIC',
477 ],
478 'defines': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000479 'SKIA_DLL',
480 'SKIA_IMPLEMENTATION=1',
481 ],
482 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000483 [ 'skia_profile_enabled == 1', {
484 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'],
djsollen@google.com3839ca12011-11-03 17:31:41 +0000485 }],
chudy@google.combbad34d2012-08-13 14:26:36 +0000486 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000487 },
488 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000489
digit@google.com1771cbf2012-01-26 21:26:40 +0000490 # We can POD-style initialization of static mutexes to avoid generating
491 # static initializers if we're using a pthread-compatible thread interface.
492 [ 'skia_os != "win"', {
493 'defines': [
borenet@google.com7158e6a2012-11-01 17:43:44 +0000494 'SK_USE_POSIX_THREADS',
digit@google.com1771cbf2012-01-26 21:26:40 +0000495 ],
496 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000497 ], # end 'conditions'
caryclark@google.com4588ce82012-09-26 15:48:43 +0000498 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details
499 'xcode_settings': {
500 'SYMROOT': '<(DEPTH)/xcodebuild',
501 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000502}
503
504# Local Variables:
505# tab-width:2
506# indent-tabs-mode:nil
507# End:
508# vim: set expandtab tabstop=2 shiftwidth=2: