blob: 9a75fffc2ce1ae3522f8bd2826e5de04375c3082 [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)',
mtklein@google.comdad70702013-11-20 18:06:10 +00006 'SK_SUPPORT_GPU=<(skia_gpu)',
7 'SK_SUPPORT_OPENCL=<(skia_opencl)',
8 'SK_DISTANCEFIELD_FONTSC=<(skia_distancefield_fonts)',
chudy@google.combbad34d2012-08-13 14:26:36 +00009 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000010 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +000011 [ 'skia_os == "win"',
seanpaul@google.com1134f982011-09-15 14:24:33 +000012 {
13 'defines': [
14 'SK_BUILD_FOR_WIN32',
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000015 '_CRT_SECURE_NO_WARNINGS',
senorblanco@chromium.org5f47a392012-07-12 00:34:39 +000016 'GR_GL_FUNCTION_TYPE=__stdcall',
seanpaul@google.com1134f982011-09-15 14:24:33 +000017 ],
18 'msvs_cygwin_shell': 0,
19 'msvs_settings': {
20 'VCCLCompilerTool': {
bsalomon@google.comb58a6392013-03-21 20:29:05 +000021 'WarningLevel': '3',
22 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
seanpaul@google.com1134f982011-09-15 14:24:33 +000023 'DebugInformationFormat': '3',
bsalomon@google.comb58a6392013-03-21 20:29:05 +000024 'ExceptionHandling': '0',
25 'AdditionalOptions': [ '/MP', ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000026 },
27 'VCLinkerTool': {
28 'AdditionalDependencies': [
29 'OpenGL32.lib',
30 'usp10.lib',
bungeman@google.comf51e1252013-06-05 18:35:22 +000031
32 # Prior to gyp r1584, the following were included automatically.
33 'kernel32.lib',
34 'gdi32.lib',
35 'winspool.lib',
36 'comdlg32.lib',
37 'advapi32.lib',
38 'shell32.lib',
39 'ole32.lib',
40 'oleaut32.lib',
41 'user32.lib',
42 'uuid.lib',
43 'odbc32.lib',
44 'odbccp32.lib',
bsalomon@google.combbba7842013-06-06 18:34:13 +000045 'DelayImp.lib',
seanpaul@google.com1134f982011-09-15 14:24:33 +000046 ],
47 },
48 },
49 'configurations': {
50 'Debug': {
51 'msvs_settings': {
52 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000053 'DebugInformationFormat': '4', # editAndContiue (/ZI)
seanpaul@google.com1134f982011-09-15 14:24:33 +000054 'Optimization': '0', # optimizeDisabled (/Od)
55 'PreprocessorDefinitions': ['_DEBUG'],
56 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000057 'RuntimeTypeInfo': 'false', # /GR-
seanpaul@google.com1134f982011-09-15 14:24:33 +000058 },
59 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000060 'GenerateDebugInformation': 'true', # /DEBUG
61 'LinkIncremental': '2', # /INCREMENTAL
seanpaul@google.com1134f982011-09-15 14:24:33 +000062 },
63 },
64 },
65 'Release': {
66 'msvs_settings': {
67 'VCCLCompilerTool': {
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000068 'DebugInformationFormat': '3', # programDatabase (/Zi)
commit-bot@chromium.org06b38642013-06-20 20:28:54 +000069 'Optimization': '<(skia_release_optimization_level)',
bsalomon@google.comd9718692013-04-22 14:56:50 +000070 'WholeProgramOptimization': 'true', #/GL
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000071 # Changing the floating point model requires rebaseling gm images
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000072 #'FloatingPointModel': '2', # fast (/fp:fast)
73 'FavorSizeOrSpeed': '1', # speed (/Ot)
seanpaul@google.com1134f982011-09-15 14:24:33 +000074 'PreprocessorDefinitions': ['NDEBUG'],
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000075 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
bsalomon@google.com9aabfc72012-05-31 14:12:46 +000076 'EnableEnhancedInstructionSet': '2',# /arch:SSE2
77 '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
bsalomon@google.comd9718692013-04-22 14:56:50 +000081 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
seanpaul@google.com1134f982011-09-15 14:24:33 +000082 },
bungeman@google.com983297e2011-10-03 19:36:51 +000083 'VCLibrarianTool': {
bsalomon@google.comd9718692013-04-22 14:56:50 +000084 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
bungeman@google.com983297e2011-10-03 19:36:51 +000085 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000086 },
87 },
88 },
borenet@google.comb7961192012-08-20 18:58:26 +000089 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +000090 [ 'skia_arch_width == 64', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +000091 'msvs_configuration_platform': 'x64',
borenet@google.coma72aef82013-03-22 13:16:06 +000092 }],
93 [ 'skia_arch_width == 32', {
94 'msvs_configuration_platform': 'Win32',
95 }],
96 [ 'skia_warnings_as_errors', {
bsalomon@google.com1d03ba92013-01-08 20:40:22 +000097 'msvs_settings': {
98 'VCCLCompilerTool': {
borenet@google.coma72aef82013-03-22 13:16:06 +000099 'WarnAsError': 'true',
100 'AdditionalOptions': [
101 '/we4189', # initialized but unused var warning
102 ],
bsalomon@google.com1d03ba92013-01-08 20:40:22 +0000103 },
104 },
borenet@google.comb7961192012-08-20 18:58:26 +0000105 }],
commit-bot@chromium.org5a6c2d82013-06-14 17:10:09 +0000106 [ 'skia_win_exceptions', {
107 'msvs_settings': {
108 'VCCLCompilerTool': {
109 'AdditionalOptions': [
110 '/EHsc',
111 ],
112 },
113 },
114 }],
borenet@google.comb7961192012-08-20 18:58:26 +0000115 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000116 },
117 ],
118
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000119 # The following section is common to linux + derivatives and android
120 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]',
121 {
mtklein@google.comf1077f92013-11-20 15:13:49 +0000122 'cflags': [
mtklein@google.comdad70702013-11-20 18:06:10 +0000123 '-g',
mtklein@google.comf1077f92013-11-20 15:13:49 +0000124 '-fno-exceptions',
125 '-fstrict-aliasing',
mtklein@google.comdad70702013-11-20 18:06:10 +0000126
mtklein@google.comf1077f92013-11-20 15:13:49 +0000127 '-Wall',
128 '-Wextra',
129 '-Winit-self',
130 '-Wpointer-arith',
131
132 '-Wno-unused-parameter',
133 '-Wno-c++11-extensions',
134 ],
135 'cflags_cc': [
136 '-fno-rtti',
137 '-Wnon-virtual-dtor',
138 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000139 'conditions': [
140 [ 'skia_warnings_as_errors', {
141 'cflags': [
142 '-Werror',
143 ],
144 }],
145 [ 'skia_arch_type == "arm" and arm_thumb == 1', {
146 'cflags': [
147 '-mthumb',
148 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000149 # The --fix-cortex-a8 switch enables a link-time workaround for
150 # an erratum in certain Cortex-A8 processors. The workaround is
151 # enabled by default if you target the ARM v7-A arch profile.
152 # It can be enabled otherwise by specifying --fix-cortex-a8, or
153 # disabled unconditionally by specifying --no-fix-cortex-a8.
154 #
155 # The erratum only affects Thumb-2 code.
156 'conditions': [
157 [ 'arm_version < 7', {
158 'ldflags': [
159 '-Wl,--fix-cortex-a8',
160 ],
161 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000162 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000163 }],
164 [ 'skia_arch_type == "arm" and arm_version >= 7', {
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000165 'cflags': [
166 '-march=armv7-a',
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000167 ],
djsollen@google.comf7542ba2013-07-31 12:57:27 +0000168 'ldflags': [
169 '-march=armv7-a',
170 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000171 'conditions': [
172 [ 'arm_neon == 1', {
173 'defines': [
174 '__ARM_HAVE_NEON',
175 ],
176 'cflags': [
177 '-mfpu=neon',
178 ],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000179 }],
180 [ 'arm_neon_optional == 1', {
181 'defines': [
182 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
183 ],
184 }],
borenet@google.come2b90372013-07-11 18:46:30 +0000185 [ 'skia_os != "chromeos"', {
186 'cflags': [
187 '-mfloat-abi=softfp',
188 ],
189 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000190 ],
191 }],
192 ],
193 },
194 ],
195
196
borenet@google.com05d550e2013-06-11 15:52:19 +0000197 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000198 {
199 'defines': [
200 'SK_SAMPLES_FOR_X',
201 'SK_BUILD_FOR_UNIX',
202 ],
203 'configurations': {
mtklein@google.com1fb04e22013-09-13 19:32:43 +0000204 'Coverage': {
mtklein@google.comdad70702013-11-20 18:06:10 +0000205 'cflags': ['--coverage'],
mtklein@google.com1fb04e22013-09-13 19:32:43 +0000206 'ldflags': ['--coverage'],
207 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000208 'Debug': {
seanpaul@google.com1134f982011-09-15 14:24:33 +0000209 },
210 'Release': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000211 'cflags': [
212 '-O<(skia_release_optimization_level)',
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000213 ],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000214 'defines': [ 'NDEBUG' ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000215 },
216 },
borenet@google.coma37a5172012-08-09 20:44:32 +0000217 'conditions' : [
zachr@google.com28c27c82013-06-20 17:15:05 +0000218 [ 'skia_shared_lib', {
219 'cflags': [
220 '-fPIC',
221 ],
222 'defines': [
zachr@google.com28c27c82013-06-20 17:15:05 +0000223 'SKIA_DLL',
224 'SKIA_IMPLEMENTATION=1',
225 ],
226 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000227 [ 'skia_os == "nacl"', {
228 'defines': [
229 'SK_BUILD_FOR_NACL',
230 ],
231 'link_settings': {
232 'libraries': [
233 '-lppapi',
234 '-lppapi_cpp',
235 '-lnosys',
236 '-pthread',
237 ],
238 },
borenet@google.comcb9445d2013-08-19 18:26:04 +0000239 }, { # skia_os != "nacl"
240 'link_settings': {
241 'ldflags': [
242 '-lstdc++',
243 '-lm',
244 ],
245 },
borenet@google.com7158e6a2012-11-01 17:43:44 +0000246 }],
borenet@google.comcb9445d2013-08-19 18:26:04 +0000247 [ 'skia_os != "chromeos"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000248 'conditions': [
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000249 [ 'skia_arch_width == 64 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000250 'cflags': [
251 '-m64',
252 ],
253 'ldflags': [
254 '-m64',
255 ],
256 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000257 [ 'skia_arch_width == 32 and skia_arch_type == "x86"', {
borenet@google.com05d550e2013-06-11 15:52:19 +0000258 'cflags': [
259 '-m32',
260 ],
261 'ldflags': [
262 '-m32',
263 ],
264 }],
265 ],
266 }],
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000267 # Enable asan, tsan, etc.
268 [ 'skia_sanitizer', {
borenet@google.com0d193092013-07-03 15:55:05 +0000269 'cflags': [
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000270 '-fsanitize=<(skia_sanitizer)',
borenet@google.com0d193092013-07-03 15:55:05 +0000271 ],
272 'ldflags': [
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000273 '-fsanitize=<(skia_sanitizer)',
bungeman@google.com1435f9f2013-09-25 22:39:22 +0000274 ],
mtklein@google.com3a19fb52013-10-09 16:12:23 +0000275 'conditions' : [
276 [ 'skia_sanitizer == "thread"', {
277 'defines': [ 'DYNAMIC_ANNOTATIONS_ENABLED=1' ],
bungeman@google.com0fbe01f2013-10-10 17:24:17 +0000278 'cflags': [ '-fPIC' ],
bungeman@google.com27d4ffe2013-10-10 17:09:49 +0000279 'target_conditions': [
280 [ '_type == "executable"', {
281 'cflags': [ '-fPIE' ],
282 'ldflags': [ '-pie' ],
283 }],
284 ],
mtklein@google.com3a19fb52013-10-09 16:12:23 +0000285 }],
286 ],
bungeman@google.com1435f9f2013-09-25 22:39:22 +0000287 }],
borenet@google.com47ae4b02013-08-21 18:02:50 +0000288 [ 'skia_clang_build', {
289 'cflags': [
mtklein@google.com9f3b0e42013-10-08 15:16:36 +0000290 # Extra warnings we like but that only Clang knows about.
borenet@google.com47ae4b02013-08-21 18:02:50 +0000291 '-Wstring-conversion',
292 ],
293 }],
commit-bot@chromium.org5003bde2013-10-25 18:14:54 +0000294 [ 'skia_keep_frame_pointer', {
295 'cflags': [ '-fno-omit-frame-pointer' ],
296 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000297 ],
298 },
299 ],
300
borenet@google.coma72aef82013-03-22 13:16:06 +0000301 [ 'skia_os == "mac"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000302 {
humper@google.com522dbd22013-02-08 21:45:33 +0000303 'variables': {
304 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)',
305 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000306 'defines': [
307 'SK_BUILD_FOR_MAC',
308 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000309 'conditions' : [
borenet@google.coma72aef82013-03-22 13:16:06 +0000310 [ 'skia_arch_width == 64', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000311 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000312 'ARCHS': ['x86_64'],
djsollen@google.come341cb32012-06-28 16:08:05 +0000313 },
314 }],
borenet@google.coma72aef82013-03-22 13:16:06 +0000315 [ 'skia_arch_width == 32', {
djsollen@google.come341cb32012-06-28 16:08:05 +0000316 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000317 'ARCHS': ['i386'],
borenet@google.coma72aef82013-03-22 13:16:06 +0000318 },
319 }],
320 [ 'skia_warnings_as_errors', {
321 'xcode_settings': {
humper@google.comfe0d6802013-01-07 20:28:16 +0000322 'OTHER_CPLUSPLUSFLAGS': [
323 '-Werror',
commit-bot@chromium.orgfaa5ae42013-07-23 11:13:56 +0000324 '-Wall',
325 '-Wextra',
326 '-Wno-unused-parameter',
humper@google.comfe0d6802013-01-07 20:28:16 +0000327 ],
djsollen@google.come341cb32012-06-28 16:08:05 +0000328 },
329 }],
mtklein@google.com8d725b22013-07-24 16:20:05 +0000330# This old compiler is really bad at figuring out when things are uninitialized, so ignore it.
331 [ '<(mac_sdk)==10.6', {
332 'xcode_settings': {
333 'OTHER_CPLUSPLUSFLAGS': [
334 '-Wno-uninitialized',
335 ],
336 },
337 }],
djsollen@google.come341cb32012-06-28 16:08:05 +0000338 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000339 'configurations': {
340 'Debug': {
341 'xcode_settings': {
342 'GCC_OPTIMIZATION_LEVEL': '0',
343 },
344 },
reed@google.come05cc8e2011-10-10 14:19:40 +0000345 'Release': {
346 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000347 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
reed@google.come05cc8e2011-10-10 14:19:40 +0000348 },
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000349 'defines': [ 'NDEBUG' ],
reed@google.come05cc8e2011-10-10 14:19:40 +0000350 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000351 },
352 'xcode_settings': {
robertphillips@google.com02297652012-04-05 19:29:04 +0000353 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
humper@google.com522dbd22013-02-08 21:45:33 +0000354 'conditions': [
borenet@google.coma72aef82013-03-22 13:16:06 +0000355 [ 'skia_osx_sdkroot==""', {
humper@google.com522dbd22013-02-08 21:45:33 +0000356 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
357 }, {
358 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
359 }],
360 ],
reed@google.com0069aa52011-11-17 15:35:47 +0000361# trying to get this to work, but it needs clang I think...
362# 'WARNING_CFLAGS': '-Wexit-time-destructors',
mike@reedtribe.orge51755f2011-12-10 19:36:56 +0000363 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
caryclark@google.comb462a422012-06-06 12:12:28 +0000364 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
365 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES',
366 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'YES',
367 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
368 'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'YES',
369 'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
370 'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
371 'GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL': 'YES',
372 'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
373 'GCC_WARN_MISSING_PARENTHESES': 'YES',
374 'GCC_WARN_PROTOTYPE_CONVERSION': 'YES',
375 'GCC_WARN_SIGN_COMPARE': 'YES',
376 'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
377 'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
378 'GCC_WARN_UNUSED_FUNCTION': 'YES',
379 'GCC_WARN_UNUSED_LABEL': 'YES',
380 'GCC_WARN_UNUSED_VALUE': 'YES',
381 'GCC_WARN_UNUSED_VARIABLE': 'YES',
bungeman@google.com43b4ed52012-10-02 15:42:21 +0000382 'OTHER_CPLUSPLUSFLAGS': [
383 '-mssse3',
384 '-fvisibility=hidden',
385 '-fvisibility-inlines-hidden',
386 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000387 },
388 },
389 ],
390
borenet@google.coma72aef82013-03-22 13:16:06 +0000391 [ 'skia_os == "ios"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000392 {
393 'defines': [
394 'SK_BUILD_FOR_IOS',
395 ],
borenet@google.coma72aef82013-03-22 13:16:06 +0000396 'conditions' : [
397 [ 'skia_warnings_as_errors', {
398 'xcode_settings': {
399 'OTHER_CPLUSPLUSFLAGS': [
400 '-Werror',
401 ],
402 },
403 }],
404 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000405 'configurations': {
406 'Debug': {
407 'xcode_settings': {
408 'GCC_OPTIMIZATION_LEVEL': '0',
409 },
410 },
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000411 'Release': {
412 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000413 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000414 },
415 'defines': [ 'NDEBUG' ],
416 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000417 },
418 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000419 'ARCHS': ['armv6', 'armv7'],
caryclark@google.com867cbd82012-09-20 15:45:41 +0000420 'CODE_SIGNING_REQUIRED': 'NO',
421 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000422 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
caryclark@google.com867cbd82012-09-20 15:45:41 +0000423 'SDKROOT': 'iphoneos',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000424 'TARGETED_DEVICE_FAMILY': '1,2',
borenet@google.coma72aef82013-03-22 13:16:06 +0000425 'OTHER_CPLUSPLUSFLAGS': [
426 '-fvisibility=hidden',
427 '-fvisibility-inlines-hidden',
428 ],
bsalomon@google.com89dec582012-09-28 18:33:11 +0000429 'GCC_THUMB_SUPPORT': 'NO',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000430 },
431 },
432 ],
chudy@google.combbad34d2012-08-13 14:26:36 +0000433
borenet@google.coma72aef82013-03-22 13:16:06 +0000434 [ 'skia_os == "android"',
djsollen@google.com58629292011-11-03 13:08:29 +0000435 {
436 'defines': [
djsollen@google.com58629292011-11-03 13:08:29 +0000437 'SK_BUILD_FOR_ANDROID',
bungeman@google.com451b5962013-11-11 18:36:46 +0000438 'SK_FONTHOST_DOES_NOT_USE_FONTMGR',
djsollen@google.com58629292011-11-03 13:08:29 +0000439 ],
440 'configurations': {
441 'Debug': {
442 'cflags': ['-g']
443 },
444 'Release': {
djsollen@google.combde506c2013-04-04 19:42:51 +0000445 'cflags': ['-O2'],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000446 'defines': [ 'NDEBUG' ],
djsollen@google.com58629292011-11-03 13:08:29 +0000447 },
448 },
449 'libraries': [
450 '-lstdc++',
451 '-lm',
djsollen@google.com318cf922011-11-08 19:03:43 +0000452 '-llog',
djsollen@google.com58629292011-11-03 13:08:29 +0000453 ],
djsollen@google.com44360bc2011-12-05 13:55:55 +0000454 'cflags': [
borenet@google.comde9ac142012-07-25 15:17:03 +0000455 '-fuse-ld=gold',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000456 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000457 'conditions': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000458 [ 'skia_shared_lib', {
459 'cflags': [
460 '-fPIC',
461 ],
462 'defines': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000463 'SKIA_DLL',
464 'SKIA_IMPLEMENTATION=1',
465 ],
466 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000467 [ 'skia_profile_enabled == 1', {
468 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'],
djsollen@google.com3839ca12011-11-03 17:31:41 +0000469 }],
chudy@google.combbad34d2012-08-13 14:26:36 +0000470 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000471 },
472 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000473
digit@google.com1771cbf2012-01-26 21:26:40 +0000474 # We can POD-style initialization of static mutexes to avoid generating
475 # static initializers if we're using a pthread-compatible thread interface.
476 [ 'skia_os != "win"', {
477 'defines': [
borenet@google.com7158e6a2012-11-01 17:43:44 +0000478 'SK_USE_POSIX_THREADS',
digit@google.com1771cbf2012-01-26 21:26:40 +0000479 ],
480 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000481 ], # end 'conditions'
caryclark@google.com4588ce82012-09-26 15:48:43 +0000482 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details
483 'xcode_settings': {
484 'SYMROOT': '<(DEPTH)/xcodebuild',
485 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000486}
487
488# Local Variables:
489# tab-width:2
490# indent-tabs-mode:nil
491# End:
492# vim: set expandtab tabstop=2 shiftwidth=2: