blob: d25f035076f44d4e9ecfa38918482d74fbba4513 [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': {
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +0000340 'Coverage': {
341 'xcode_settings': {
342 'GCC_OPTIMIZATION_LEVEL': '0',
343 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
344 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS' : 'YES',
345 },
346 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000347 'Debug': {
348 'xcode_settings': {
349 'GCC_OPTIMIZATION_LEVEL': '0',
350 },
351 },
reed@google.come05cc8e2011-10-10 14:19:40 +0000352 'Release': {
353 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000354 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
reed@google.come05cc8e2011-10-10 14:19:40 +0000355 },
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000356 'defines': [ 'NDEBUG' ],
reed@google.come05cc8e2011-10-10 14:19:40 +0000357 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000358 },
359 'xcode_settings': {
robertphillips@google.com02297652012-04-05 19:29:04 +0000360 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
humper@google.com522dbd22013-02-08 21:45:33 +0000361 'conditions': [
borenet@google.coma72aef82013-03-22 13:16:06 +0000362 [ 'skia_osx_sdkroot==""', {
humper@google.com522dbd22013-02-08 21:45:33 +0000363 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
364 }, {
365 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
366 }],
367 ],
reed@google.com0069aa52011-11-17 15:35:47 +0000368# trying to get this to work, but it needs clang I think...
369# 'WARNING_CFLAGS': '-Wexit-time-destructors',
mike@reedtribe.orge51755f2011-12-10 19:36:56 +0000370 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
caryclark@google.comb462a422012-06-06 12:12:28 +0000371 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
372 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES',
373 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'YES',
374 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
375 'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'YES',
376 'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
377 'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
378 'GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL': 'YES',
379 'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
380 'GCC_WARN_MISSING_PARENTHESES': 'YES',
381 'GCC_WARN_PROTOTYPE_CONVERSION': 'YES',
382 'GCC_WARN_SIGN_COMPARE': 'YES',
383 'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
384 'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
385 'GCC_WARN_UNUSED_FUNCTION': 'YES',
386 'GCC_WARN_UNUSED_LABEL': 'YES',
387 'GCC_WARN_UNUSED_VALUE': 'YES',
388 'GCC_WARN_UNUSED_VARIABLE': 'YES',
bungeman@google.com43b4ed52012-10-02 15:42:21 +0000389 'OTHER_CPLUSPLUSFLAGS': [
390 '-mssse3',
391 '-fvisibility=hidden',
392 '-fvisibility-inlines-hidden',
393 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000394 },
395 },
396 ],
397
borenet@google.coma72aef82013-03-22 13:16:06 +0000398 [ 'skia_os == "ios"',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000399 {
400 'defines': [
401 'SK_BUILD_FOR_IOS',
402 ],
borenet@google.coma72aef82013-03-22 13:16:06 +0000403 'conditions' : [
404 [ 'skia_warnings_as_errors', {
405 'xcode_settings': {
406 'OTHER_CPLUSPLUSFLAGS': [
407 '-Werror',
408 ],
409 },
410 }],
411 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000412 'configurations': {
413 'Debug': {
414 'xcode_settings': {
415 'GCC_OPTIMIZATION_LEVEL': '0',
416 },
417 },
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000418 'Release': {
419 'xcode_settings': {
commit-bot@chromium.org06b38642013-06-20 20:28:54 +0000420 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000421 },
422 'defines': [ 'NDEBUG' ],
423 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000424 },
425 'xcode_settings': {
commit-bot@chromium.org5d7ca952013-04-22 20:26:44 +0000426 'ARCHS': ['armv6', 'armv7'],
caryclark@google.com867cbd82012-09-20 15:45:41 +0000427 'CODE_SIGNING_REQUIRED': 'NO',
428 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000429 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
caryclark@google.com867cbd82012-09-20 15:45:41 +0000430 'SDKROOT': 'iphoneos',
caryclark@google.com594dd3c2012-09-24 19:33:57 +0000431 'TARGETED_DEVICE_FAMILY': '1,2',
borenet@google.coma72aef82013-03-22 13:16:06 +0000432 'OTHER_CPLUSPLUSFLAGS': [
433 '-fvisibility=hidden',
434 '-fvisibility-inlines-hidden',
435 ],
bsalomon@google.com89dec582012-09-28 18:33:11 +0000436 'GCC_THUMB_SUPPORT': 'NO',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000437 },
438 },
439 ],
chudy@google.combbad34d2012-08-13 14:26:36 +0000440
borenet@google.coma72aef82013-03-22 13:16:06 +0000441 [ 'skia_os == "android"',
djsollen@google.com58629292011-11-03 13:08:29 +0000442 {
443 'defines': [
djsollen@google.com58629292011-11-03 13:08:29 +0000444 'SK_BUILD_FOR_ANDROID',
bungeman@google.com451b5962013-11-11 18:36:46 +0000445 'SK_FONTHOST_DOES_NOT_USE_FONTMGR',
djsollen@google.com58629292011-11-03 13:08:29 +0000446 ],
447 'configurations': {
448 'Debug': {
449 'cflags': ['-g']
450 },
451 'Release': {
djsollen@google.combde506c2013-04-04 19:42:51 +0000452 'cflags': ['-O2'],
senorblanco@chromium.org7288c492012-01-19 19:59:22 +0000453 'defines': [ 'NDEBUG' ],
djsollen@google.com58629292011-11-03 13:08:29 +0000454 },
455 },
456 'libraries': [
457 '-lstdc++',
458 '-lm',
djsollen@google.com318cf922011-11-08 19:03:43 +0000459 '-llog',
djsollen@google.com58629292011-11-03 13:08:29 +0000460 ],
djsollen@google.com44360bc2011-12-05 13:55:55 +0000461 'cflags': [
borenet@google.comde9ac142012-07-25 15:17:03 +0000462 '-fuse-ld=gold',
djsollen@google.com44360bc2011-12-05 13:55:55 +0000463 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000464 'conditions': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000465 [ 'skia_shared_lib', {
466 'cflags': [
467 '-fPIC',
468 ],
469 'defines': [
djsollen@google.com52f02972013-06-03 12:10:19 +0000470 'SKIA_DLL',
471 'SKIA_IMPLEMENTATION=1',
472 ],
473 }],
commit-bot@chromium.org183f7f52013-07-11 12:48:14 +0000474 [ 'skia_profile_enabled == 1', {
475 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'],
djsollen@google.com3839ca12011-11-03 17:31:41 +0000476 }],
chudy@google.combbad34d2012-08-13 14:26:36 +0000477 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000478 },
479 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000480
digit@google.com1771cbf2012-01-26 21:26:40 +0000481 # We can POD-style initialization of static mutexes to avoid generating
482 # static initializers if we're using a pthread-compatible thread interface.
483 [ 'skia_os != "win"', {
484 'defines': [
borenet@google.com7158e6a2012-11-01 17:43:44 +0000485 'SK_USE_POSIX_THREADS',
digit@google.com1771cbf2012-01-26 21:26:40 +0000486 ],
487 }],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000488 ], # end 'conditions'
caryclark@google.com4588ce82012-09-26 15:48:43 +0000489 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details
490 'xcode_settings': {
491 'SYMROOT': '<(DEPTH)/xcodebuild',
492 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000493}
494
495# Local Variables:
496# tab-width:2
497# indent-tabs-mode:nil
498# End:
499# vim: set expandtab tabstop=2 shiftwidth=2: