OLD | NEW |
1 # Copyright 2015 Google Inc. | 1 # Copyright 2015 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # conditions used in both common.gypi and skia.gyp in chromium | 6 # conditions used in both common.gypi and skia.gyp in chromium |
7 # | 7 # |
8 { | 8 { |
9 'defines': [ | 9 'defines': [ |
10 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', | 10 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 }, | 201 }, |
202 }, | 202 }, |
203 }, | 203 }, |
204 }, | 204 }, |
205 }], | 205 }], |
206 ], | 206 ], |
207 }, | 207 }, |
208 ], | 208 ], |
209 | 209 |
210 # The following section is common to linux + derivatives and android | 210 # The following section is common to linux + derivatives and android |
211 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos",
"android"]', | 211 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "androi
d"]', |
212 { | 212 { |
213 'cflags': [ | 213 'cflags': [ |
214 '-g', | 214 '-g', |
215 '-fno-exceptions', | 215 '-fno-exceptions', |
216 '-fstrict-aliasing', | 216 '-fstrict-aliasing', |
217 | 217 |
218 '-Wall', | 218 '-Wall', |
219 '-Wextra', | 219 '-Wextra', |
220 '-Winit-self', | 220 '-Winit-self', |
221 '-Wpointer-arith', | 221 '-Wpointer-arith', |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 ], | 322 ], |
323 }], | 323 }], |
324 ], | 324 ], |
325 }], | 325 }], |
326 ], | 326 ], |
327 }], | 327 }], |
328 ], | 328 ], |
329 }, | 329 }, |
330 ], | 330 ], |
331 | 331 |
332 [ 'skia_os == "nacl"', { | |
333 # NaCl compiler is GCC 4.4, which is too old to understand 'c++11', so cal
l it '0x'. | |
334 # NaCl's newlib needs gnu++ mode to see snprintf, vsnprintf, etc in C++11
mode. | |
335 'cflags_cc!': [ '-std=c++11' ], | |
336 'cflags_cc' : [ '-std=gnu++0x' ], | |
337 }], | |
338 | |
339 ['skia_android_framework', { | 332 ['skia_android_framework', { |
340 'includes' : [ | 333 'includes' : [ |
341 'skia_for_android_framework_defines.gypi', | 334 'skia_for_android_framework_defines.gypi', |
342 ], | 335 ], |
343 'cflags': [ | 336 'cflags': [ |
344 # Skia does not enforce this usage pattern so we disable it here to avoi
d | 337 # Skia does not enforce this usage pattern so we disable it here to avoi
d |
345 # unecessary log spew when building | 338 # unecessary log spew when building |
346 '-Wno-unused-parameter', | 339 '-Wno-unused-parameter', |
347 | 340 |
348 # Android's -D_FORTIFY_SOURCE=2 extensions are incompatibile with SkStri
ng. | 341 # Android's -D_FORTIFY_SOURCE=2 extensions are incompatibile with SkStri
ng. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 'SK_IGNORE_ETC1_SUPPORT', | 393 'SK_IGNORE_ETC1_SUPPORT', |
401 # We can't use the skia_shared_library gyp setting because we need expos
e | 394 # We can't use the skia_shared_library gyp setting because we need expos
e |
402 # this define globally and the the implemention define as a cflag. | 395 # this define globally and the the implemention define as a cflag. |
403 'SKIA_DLL', | 396 'SKIA_DLL', |
404 'SK_PRINT_CODEC_MESSAGES', | 397 'SK_PRINT_CODEC_MESSAGES', |
405 # Defines from skia_for_android_framework_defines.gypi | 398 # Defines from skia_for_android_framework_defines.gypi |
406 '<@(skia_for_android_framework_defines)', | 399 '<@(skia_for_android_framework_defines)', |
407 ], | 400 ], |
408 }], | 401 }], |
409 | 402 |
410 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]
', | 403 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', |
411 { | 404 { |
412 'defines': [ | 405 'defines': [ |
413 'SK_SAMPLES_FOR_X', | 406 'SK_SAMPLES_FOR_X', |
414 'SK_BUILD_FOR_UNIX', | 407 'SK_BUILD_FOR_UNIX', |
415 ], | 408 ], |
416 'configurations': { | 409 'configurations': { |
417 'Coverage': { | 410 'Coverage': { |
418 'cflags': ['--coverage'], | 411 'cflags': ['--coverage'], |
419 'ldflags': ['--coverage'], | 412 'ldflags': ['--coverage'], |
420 }, | 413 }, |
421 'Debug': { | 414 'Debug': { |
422 }, | 415 }, |
423 'Release': { | 416 'Release': { |
424 'cflags': [ | 417 'cflags': [ |
425 '-O<(skia_release_optimization_level)', | 418 '-O<(skia_release_optimization_level)', |
426 ], | 419 ], |
427 'defines': [ 'NDEBUG' ], | 420 'defines': [ 'NDEBUG' ], |
428 }, | 421 }, |
429 }, | 422 }, |
430 'conditions' : [ | 423 'conditions' : [ |
431 [ 'skia_shared_lib', { | 424 [ 'skia_shared_lib', { |
432 'defines': [ | 425 'defines': [ |
433 'SKIA_DLL', | 426 'SKIA_DLL', |
434 'SKIA_IMPLEMENTATION=1', | 427 'SKIA_IMPLEMENTATION=1', |
435 ], | 428 ], |
436 }], | 429 }], |
437 [ 'skia_os == "nacl"', { | |
438 'defines': [ | |
439 'SK_BUILD_FOR_NACL', | |
440 ], | |
441 'variables': { | |
442 'nacl_sdk_root': '<!(echo ${NACL_SDK_ROOT})', | |
443 }, | |
444 'link_settings': { | |
445 'libraries': [ | |
446 '-lppapi', | |
447 '-lppapi_cpp', | |
448 '-lnosys', | |
449 '-pthread', | |
450 ], | |
451 'ldflags': [ | |
452 '-L<(nacl_sdk_root)/lib/newlib_x86_<(skia_arch_width)/Release', | |
453 '-L<(nacl_sdk_root)/ports/lib/newlib_x86_<(skia_arch_width)/Rele
ase', | |
454 ], | |
455 }, | |
456 }], | |
457 # Enable asan, tsan, etc. | 430 # Enable asan, tsan, etc. |
458 [ 'skia_sanitizer', { | 431 [ 'skia_sanitizer', { |
459 'cflags': [ | 432 'cflags': [ |
460 '-fsanitize=<(skia_sanitizer)', | 433 '-fsanitize=<(skia_sanitizer)', |
461 ], | 434 ], |
462 'ldflags': [ | 435 'ldflags': [ |
463 '-fsanitize=<(skia_sanitizer)', | 436 '-fsanitize=<(skia_sanitizer)', |
464 ], | 437 ], |
465 'conditions' : [ | 438 'conditions' : [ |
466 [ 'skia_sanitizer == "thread"', { | 439 [ 'skia_sanitizer == "thread"', { |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 # add flags here (e.g. SK_SUPPORT_LEGACY_...) needed by moz2d | 620 # add flags here (e.g. SK_SUPPORT_LEGACY_...) needed by moz2d |
648 ], | 621 ], |
649 }], | 622 }], |
650 | 623 |
651 ], # end 'conditions' | 624 ], # end 'conditions' |
652 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for
more details | 625 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for
more details |
653 'xcode_settings': { | 626 'xcode_settings': { |
654 'SYMROOT': '<(DEPTH)/xcodebuild', | 627 'SYMROOT': '<(DEPTH)/xcodebuild', |
655 }, | 628 }, |
656 } | 629 } |
OLD | NEW |