OLD | NEW |
1 # conditions used in both common.gypi and skia.gyp in chromium | 1 # conditions used in both common.gypi and skia.gyp in chromium |
2 # | 2 # |
3 { | 3 { |
4 'defines': [ | 4 'defines': [ |
5 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', | 5 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', |
6 # 'SK_SUPPORT_HINTING_SCALE_FACTOR', | 6 # 'SK_SUPPORT_HINTING_SCALE_FACTOR', |
7 ], | 7 ], |
8 'conditions' : [ | 8 'conditions' : [ |
9 ['skia_gpu == 1', | 9 [ 'skia_gpu == 1', |
10 { | 10 { |
11 'defines': [ | 11 'defines': [ |
12 'SK_SUPPORT_GPU=1', | 12 'SK_SUPPORT_GPU=1', |
13 ], | 13 ], |
14 }, { | 14 }, { |
15 'defines': [ | 15 'defines': [ |
16 'SK_SUPPORT_GPU=0', | 16 'SK_SUPPORT_GPU=0', |
17 ], | 17 ], |
18 }, | 18 }, |
19 ], | 19 ], |
20 ['skia_os == "win"', | 20 [ 'skia_os == "win"', |
21 { | 21 { |
22 'defines': [ | 22 'defines': [ |
23 'SK_BUILD_FOR_WIN32', | 23 'SK_BUILD_FOR_WIN32', |
24 'SK_IGNORE_STDINT_DOT_H', | 24 'SK_IGNORE_STDINT_DOT_H', |
25 '_CRT_SECURE_NO_WARNINGS', | 25 '_CRT_SECURE_NO_WARNINGS', |
26 'GR_GL_FUNCTION_TYPE=__stdcall', | 26 'GR_GL_FUNCTION_TYPE=__stdcall', |
27 ], | 27 ], |
28 'msvs_cygwin_shell': 0, | 28 'msvs_cygwin_shell': 0, |
29 'msvs_settings': { | 29 'msvs_settings': { |
30 'VCCLCompilerTool': { | 30 'VCCLCompilerTool': { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 'GenerateDebugInformation': 'true', # /DEBUG | 75 'GenerateDebugInformation': 'true', # /DEBUG |
76 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration
/LTCG | 76 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration
/LTCG |
77 }, | 77 }, |
78 'VCLibrarianTool': { | 78 'VCLibrarianTool': { |
79 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration
/LTCG | 79 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration
/LTCG |
80 }, | 80 }, |
81 }, | 81 }, |
82 }, | 82 }, |
83 }, | 83 }, |
84 'conditions' : [ | 84 'conditions' : [ |
85 ['skia_arch_width == 64', { | 85 [ 'skia_arch_width == 64', { |
86 'msvs_configuration_platform': 'x64', | 86 'msvs_configuration_platform': 'x64', |
| 87 }], |
| 88 [ 'skia_arch_width == 32', { |
| 89 'msvs_configuration_platform': 'Win32', |
| 90 }], |
| 91 [ 'skia_warnings_as_errors', { |
87 'msvs_settings': { | 92 'msvs_settings': { |
88 'VCCLCompilerTool': { | 93 'VCCLCompilerTool': { |
89 'WarnAsError': 'false', | 94 'WarnAsError': 'true', |
| 95 'AdditionalOptions': [ |
| 96 '/we4189', # initialized but unused var warning |
| 97 ], |
90 }, | 98 }, |
91 }, | 99 }, |
92 }], | 100 }], |
93 ['skia_arch_width == 32', { | |
94 # This gypi file will be included directly into the gyp(i) files in
the angle repo by | |
95 # our gyp_skia script. We don't want force WarnAsError on angle. So
angle.gyp defines | |
96 # skia_building_angle=1 and here we select whether to enable WarnAsE
rror based on that | |
97 # var's value. Here it defaults to 0. | |
98 'variables' : { | |
99 'skia_building_angle%': 0, | |
100 }, | |
101 'conditions' : [ | |
102 ['skia_building_angle', { | |
103 'msvs_configuration_platform': 'Win32', | |
104 'msvs_settings': { | |
105 'VCCLCompilerTool': { | |
106 'WarnAsError': 'false', | |
107 }, | |
108 }, | |
109 },{ # not angle | |
110 'msvs_configuration_platform': 'Win32', | |
111 'msvs_settings': { | |
112 'VCCLCompilerTool': { | |
113 'WarnAsError': 'true', | |
114 'AdditionalOptions': [ | |
115 '/we4189', # initialized but unused var warning | |
116 ], | |
117 }, | |
118 }, | |
119 }], | |
120 ], | |
121 }], | |
122 ], | 101 ], |
123 }, | 102 }, |
124 ], | 103 ], |
125 | 104 |
126 ['skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', | 105 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', |
127 { | 106 { |
128 'defines': [ | 107 'defines': [ |
129 'SK_SAMPLES_FOR_X', | 108 'SK_SAMPLES_FOR_X', |
130 'SK_BUILD_FOR_UNIX', | 109 'SK_BUILD_FOR_UNIX', |
131 ], | 110 ], |
132 'configurations': { | 111 'configurations': { |
133 'Debug': { | 112 'Debug': { |
134 'cflags': ['-g'] | 113 'cflags': ['-g'] |
135 }, | 114 }, |
136 'Release': { | 115 'Release': { |
137 'cflags': ['-O3 -g'], | 116 'cflags': ['-O3 -g'], |
138 'defines': [ 'NDEBUG' ], | 117 'defines': [ 'NDEBUG' ], |
139 }, | 118 }, |
140 }, | 119 }, |
141 'cflags': [ | 120 'cflags': [ |
142 '-Werror', | |
143 '-Wall', | 121 '-Wall', |
144 '-Wextra', | 122 '-Wextra', |
145 # suppressions below here were added for clang | 123 # suppressions below here were added for clang |
146 '-Wno-unused-parameter', | 124 '-Wno-unused-parameter', |
147 '-Wno-c++11-extensions' | 125 '-Wno-c++11-extensions' |
148 ], | 126 ], |
149 'conditions' : [ | 127 'conditions' : [ |
150 ['skia_warnings_as_errors == 1', { | 128 [ 'skia_warnings_as_errors', { |
151 'cflags': [ | 129 'cflags': [ |
152 '-Werror', | 130 '-Werror', |
153 ], | 131 ], |
154 }], | 132 }], |
155 ['skia_arch_width == 64', { | 133 [ 'skia_arch_width == 64', { |
156 'cflags': [ | 134 'cflags': [ |
157 '-m64', | 135 '-m64', |
158 ], | 136 ], |
159 'ldflags': [ | 137 'ldflags': [ |
160 '-m64', | 138 '-m64', |
161 ], | 139 ], |
162 }], | 140 }], |
163 ['skia_arch_width == 32', { | 141 [ 'skia_arch_width == 32', { |
164 'cflags': [ | 142 'cflags': [ |
165 '-m32', | 143 '-m32', |
166 ], | 144 ], |
167 'ldflags': [ | 145 'ldflags': [ |
168 '-m32', | 146 '-m32', |
169 ], | 147 ], |
170 }], | 148 }], |
171 [ 'skia_os == "nacl"', { | 149 [ 'skia_os == "nacl"', { |
172 'defines': [ | 150 'defines': [ |
173 'SK_BUILD_FOR_NACL', | 151 'SK_BUILD_FOR_NACL', |
174 ], | 152 ], |
175 'link_settings': { | 153 'link_settings': { |
176 'libraries': [ | 154 'libraries': [ |
177 '-lppapi', | 155 '-lppapi', |
178 '-lppapi_cpp', | 156 '-lppapi_cpp', |
179 '-lnosys', | 157 '-lnosys', |
180 '-pthread', | 158 '-pthread', |
181 ], | 159 ], |
182 }, | 160 }, |
183 }, { # skia_os != "nacl" | 161 }, { # skia_os != "nacl" |
184 'include_dirs' : [ | 162 'include_dirs' : [ |
185 '/usr/include/freetype2', | 163 '/usr/include/freetype2', |
186 ], | 164 ], |
187 }], | 165 }], |
188 ], | 166 ], |
189 }, | 167 }, |
190 ], | 168 ], |
191 | 169 |
192 ['skia_os == "mac"', | 170 [ 'skia_os == "mac"', |
193 { | 171 { |
194 'variables': { | 172 'variables': { |
195 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)', | 173 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)', |
196 }, | 174 }, |
197 'defines': [ | 175 'defines': [ |
198 'SK_BUILD_FOR_MAC', | 176 'SK_BUILD_FOR_MAC', |
199 ], | 177 ], |
200 'conditions' : [ | 178 'conditions' : [ |
201 ['skia_arch_width == 64', { | 179 [ 'skia_arch_width == 64', { |
202 'xcode_settings': { | 180 'xcode_settings': { |
203 'ARCHS': 'x86_64', | 181 'ARCHS': 'x86_64', |
204 }, | 182 }, |
205 }], | 183 }], |
206 ['skia_arch_width == 32', { | 184 [ 'skia_arch_width == 32', { |
207 'xcode_settings': { | 185 'xcode_settings': { |
208 'ARCHS': 'i386', | 186 'ARCHS': 'i386', |
| 187 }, |
| 188 }], |
| 189 [ 'skia_warnings_as_errors', { |
| 190 'xcode_settings': { |
209 'OTHER_CPLUSPLUSFLAGS': [ | 191 'OTHER_CPLUSPLUSFLAGS': [ |
210 '-Werror', | 192 '-Werror', |
211 ], | 193 ], |
212 }, | 194 }, |
213 }], | 195 }], |
214 ], | 196 ], |
215 'configurations': { | 197 'configurations': { |
216 'Debug': { | 198 'Debug': { |
217 'xcode_settings': { | 199 'xcode_settings': { |
218 'GCC_OPTIMIZATION_LEVEL': '0', | 200 'GCC_OPTIMIZATION_LEVEL': '0', |
219 }, | 201 }, |
220 }, | 202 }, |
221 'Release': { | 203 'Release': { |
222 'xcode_settings': { | 204 'xcode_settings': { |
223 'GCC_OPTIMIZATION_LEVEL': '3', | 205 'GCC_OPTIMIZATION_LEVEL': '3', |
224 }, | 206 }, |
225 'defines': [ 'NDEBUG' ], | 207 'defines': [ 'NDEBUG' ], |
226 }, | 208 }, |
227 }, | 209 }, |
228 'xcode_settings': { | 210 'xcode_settings': { |
229 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', | 211 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', |
230 'conditions': [ | 212 'conditions': [ |
231 ['skia_osx_sdkroot==""', { | 213 [ 'skia_osx_sdkroot==""', { |
232 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot | 214 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
233 }, { | 215 }, { |
234 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot | 216 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot |
235 }], | 217 }], |
236 ], | 218 ], |
237 # trying to get this to work, but it needs clang I think... | 219 # trying to get this to work, but it needs clang I think... |
238 # 'WARNING_CFLAGS': '-Wexit-time-destructors', | 220 # 'WARNING_CFLAGS': '-Wexit-time-destructors', |
239 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', | 221 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
240 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES', | 222 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES', |
241 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES', | 223 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES', |
(...skipping 15 matching lines...) Expand all Loading... |
257 'GCC_WARN_UNUSED_VARIABLE': 'YES', | 239 'GCC_WARN_UNUSED_VARIABLE': 'YES', |
258 'OTHER_CPLUSPLUSFLAGS': [ | 240 'OTHER_CPLUSPLUSFLAGS': [ |
259 '-mssse3', | 241 '-mssse3', |
260 '-fvisibility=hidden', | 242 '-fvisibility=hidden', |
261 '-fvisibility-inlines-hidden', | 243 '-fvisibility-inlines-hidden', |
262 ], | 244 ], |
263 }, | 245 }, |
264 }, | 246 }, |
265 ], | 247 ], |
266 | 248 |
267 ['skia_os == "ios"', | 249 [ 'skia_os == "ios"', |
268 { | 250 { |
269 'defines': [ | 251 'defines': [ |
270 'SK_BUILD_FOR_IOS', | 252 'SK_BUILD_FOR_IOS', |
271 ], | 253 ], |
| 254 'conditions' : [ |
| 255 [ 'skia_warnings_as_errors', { |
| 256 'xcode_settings': { |
| 257 'OTHER_CPLUSPLUSFLAGS': [ |
| 258 '-Werror', |
| 259 ], |
| 260 }, |
| 261 }], |
| 262 ], |
272 'configurations': { | 263 'configurations': { |
273 'Debug': { | 264 'Debug': { |
274 'xcode_settings': { | 265 'xcode_settings': { |
275 'GCC_OPTIMIZATION_LEVEL': '0', | 266 'GCC_OPTIMIZATION_LEVEL': '0', |
276 }, | 267 }, |
277 }, | 268 }, |
278 'Release': { | 269 'Release': { |
279 'xcode_settings': { | 270 'xcode_settings': { |
280 'GCC_OPTIMIZATION_LEVEL': '3', | 271 'GCC_OPTIMIZATION_LEVEL': '3', |
281 }, | 272 }, |
282 'defines': [ 'NDEBUG' ], | 273 'defines': [ 'NDEBUG' ], |
283 }, | 274 }, |
284 }, | 275 }, |
285 'xcode_settings': { | 276 'xcode_settings': { |
286 'ARCHS': 'armv6 armv7', | 277 'ARCHS': 'armv6 armv7', |
287 'CODE_SIGNING_REQUIRED': 'NO', | 278 'CODE_SIGNING_REQUIRED': 'NO', |
288 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', | 279 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
289 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)', | 280 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)', |
290 'SDKROOT': 'iphoneos', | 281 'SDKROOT': 'iphoneos', |
291 'TARGETED_DEVICE_FAMILY': '1,2', | 282 'TARGETED_DEVICE_FAMILY': '1,2', |
292 'OTHER_CPLUSPLUSFLAGS': '-fvisibility=hidden -fvisibility-inlines-hidd
en', | 283 'OTHER_CPLUSPLUSFLAGS': [ |
| 284 '-fvisibility=hidden', |
| 285 '-fvisibility-inlines-hidden', |
| 286 ], |
293 'GCC_THUMB_SUPPORT': 'NO', | 287 'GCC_THUMB_SUPPORT': 'NO', |
294 }, | 288 }, |
295 }, | 289 }, |
296 ], | 290 ], |
297 | 291 |
298 ['skia_os == "android"', | 292 [ 'skia_os == "android"', |
299 { | 293 { |
300 'defines': [ | 294 'defines': [ |
301 'SK_BUILD_FOR_ANDROID', | 295 'SK_BUILD_FOR_ANDROID', |
302 ], | 296 ], |
303 'configurations': { | 297 'configurations': { |
304 'Debug': { | 298 'Debug': { |
305 'cflags': ['-g'] | 299 'cflags': ['-g'] |
306 }, | 300 }, |
307 'Release': { | 301 'Release': { |
308 'cflags': ['-O3'], | 302 'cflags': ['-O3'], |
309 'defines': [ 'NDEBUG' ], | 303 'defines': [ 'NDEBUG' ], |
310 }, | 304 }, |
311 }, | 305 }, |
312 'libraries': [ | 306 'libraries': [ |
313 '-lstdc++', | 307 '-lstdc++', |
314 '-lm', | 308 '-lm', |
315 '-llog', | 309 '-llog', |
316 ], | 310 ], |
317 'cflags': [ | 311 'cflags': [ |
318 '-Wall', | 312 '-Wall', |
319 '-fno-exceptions', | 313 '-fno-exceptions', |
320 '-fno-rtti', | 314 '-fno-rtti', |
321 '-fstrict-aliasing', | 315 '-fstrict-aliasing', |
322 '-fuse-ld=gold', | 316 '-fuse-ld=gold', |
323 ], | 317 ], |
324 'conditions': [ | 318 'conditions': [ |
325 [ 'skia_warnings_as_errors == 1', { | 319 [ 'skia_warnings_as_errors', { |
326 'cflags': [ | 320 'cflags': [ |
327 '-Werror', | 321 '-Werror', |
328 ], | 322 ], |
329 }], | 323 }], |
330 [ 'skia_profile_enabled == 1', { | 324 [ 'skia_profile_enabled == 1', { |
331 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'], | 325 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'], |
332 }], | 326 }], |
333 [ 'skia_arch_type == "arm" and arm_thumb == 1', { | 327 [ 'skia_arch_type == "arm" and arm_thumb == 1', { |
334 'cflags': [ | 328 'cflags': [ |
335 '-mthumb', | 329 '-mthumb', |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 'xcode_settings': { | 376 'xcode_settings': { |
383 'SYMROOT': '<(DEPTH)/xcodebuild', | 377 'SYMROOT': '<(DEPTH)/xcodebuild', |
384 }, | 378 }, |
385 } | 379 } |
386 | 380 |
387 # Local Variables: | 381 # Local Variables: |
388 # tab-width:2 | 382 # tab-width:2 |
389 # indent-tabs-mode:nil | 383 # indent-tabs-mode:nil |
390 # End: | 384 # End: |
391 # vim: set expandtab tabstop=2 shiftwidth=2: | 385 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |