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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 }], | 469 }], |
470 [ 'skia_keep_frame_pointer', { | 470 [ 'skia_keep_frame_pointer', { |
471 'cflags': [ '-fno-omit-frame-pointer' ], | 471 'cflags': [ '-fno-omit-frame-pointer' ], |
472 }], | 472 }], |
473 ], | 473 ], |
474 }, | 474 }, |
475 ], | 475 ], |
476 | 476 |
477 [ 'skia_os == "mac"', | 477 [ 'skia_os == "mac"', |
478 { | 478 { |
479 'variables': { | |
480 # Setup some flags that are used below in both the XCode/ninja build
as well as the | |
481 # cmake build. | |
482 'common_c_and_cpp_flags': [ | |
483 '-mssse3', | |
484 '-fvisibility=hidden', | |
485 '-fvisibility-inlines-hidden', | |
486 '-Wall', | |
487 '-Wextra', | |
488 '-Winit-self', | |
489 '-Wpointer-arith', | |
490 '-Wsign-compare', | |
491 '-Wno-unused-parameter', | |
492 ], | |
493 'common_cpp_flags': [ | |
494 '-fno-threadsafe-statics', | |
495 '-fno-exceptions', | |
496 '-fno-rtti', | |
497 '-std=c++11', | |
498 '-stdlib=libc++' | |
499 ], | |
500 }, | |
501 'defines': [ 'SK_BUILD_FOR_MAC' ], | 479 'defines': [ 'SK_BUILD_FOR_MAC' ], |
502 'conditions': [ | 480 'conditions': [ |
503 # ANGLE for mac hits -Wunneeded-internal-declaration if this isn't s
et. | 481 # ANGLE for mac hits -Wunneeded-internal-declaration if this isn't s
et. |
504 [ 'skia_angle', { 'defines': [ 'YY_NO_INPUT' ], } ], | 482 [ 'skia_angle', { 'defines': [ 'YY_NO_INPUT' ], } ], |
505 ], | 483 ], |
506 'configurations': { | 484 'configurations': { |
507 'Coverage': { | 485 'Coverage': { |
508 'xcode_settings': { | 486 'xcode_settings': { |
509 'GCC_OPTIMIZATION_LEVEL': '0', | 487 'GCC_OPTIMIZATION_LEVEL': '0', |
510 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', | 488 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', |
(...skipping 13 matching lines...) Expand all Loading... |
524 [ 'skia_fast', { 'WARNING_CFLAGS': [ '<@(skia_fast_flags)' ] } ], | 502 [ 'skia_fast', { 'WARNING_CFLAGS': [ '<@(skia_fast_flags)' ] } ], |
525 [ 'skia_warnings_as_errors', { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES'
}], | 503 [ 'skia_warnings_as_errors', { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES'
}], |
526 [ 'skia_arch_type == "x86"', { 'ARCHS': ['i386'] }], | 504 [ 'skia_arch_type == "x86"', { 'ARCHS': ['i386'] }], |
527 [ 'skia_arch_type == "x86_64"', { 'ARCHS': ['x86_64'] }], | 505 [ 'skia_arch_type == "x86_64"', { 'ARCHS': ['x86_64'] }], |
528 [ 'skia_osx_deployment_target==""', { | 506 [ 'skia_osx_deployment_target==""', { |
529 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed
in env to ld. | 507 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed
in env to ld. |
530 }, { | 508 }, { |
531 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)', | 509 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)', |
532 }], | 510 }], |
533 [ 'skia_sanitizer', { | 511 [ 'skia_sanitizer', { |
| 512 'GCC_ENABLE_CPP_RTTI': 'YES', # vptr needs
rtti |
534 'OTHER_CFLAGS': [ | 513 'OTHER_CFLAGS': [ |
535 '-fsanitize=<(skia_sanitizer)', # Turn on sa
nitizers. | 514 '-fsanitize=<(skia_sanitizer)', # Turn on sa
nitizers. |
536 '-fno-sanitize-recover=<(skia_sanitizer)', # Make any f
ailure fatal. | 515 '-fno-sanitize-recover=<(skia_sanitizer)', # Make any f
ailure fatal. |
537 '-fsanitize-blacklist=<(skia_sanitizer_blacklist)', # Compile in
our blacklist. | 516 '-fsanitize-blacklist=<(skia_sanitizer_blacklist)', # Compile in
our blacklist. |
538 '-include <(skia_sanitizer_blacklist)', # Make every
.cpp depend on it. | 517 '-include <(skia_sanitizer_blacklist)', # Make every
.cpp depend on it. |
539 ], | 518 ], |
540 'OTHER_CPLUSPLUSFLAGS': [ | |
541 '-frtti', # vptr needs
rtti | |
542 ], | |
543 # We want to pass -fsanitize=... to our final link call, | 519 # We want to pass -fsanitize=... to our final link call, |
544 # but not to libtool. OTHER_LDFLAGS is passed to both. | 520 # but not to libtool. OTHER_LDFLAGS is passed to both. |
545 # To trick GYP into doing what we want, we'll piggyback on | 521 # To trick GYP into doing what we want, we'll piggyback on |
546 # LIBRARY_SEARCH_PATHS, producing "-L/usr/lib -fsanitize=...". | 522 # LIBRARY_SEARCH_PATHS, producing "-L/usr/lib -fsanitize=...". |
547 # The -L/usr/lib is redundant but innocuous: it's a default path. | 523 # The -L/usr/lib is redundant but innocuous: it's a default path. |
548 'LIBRARY_SEARCH_PATHS': [ '/usr/lib -fsanitize=<(skia_sanitizer)']
, | 524 'LIBRARY_SEARCH_PATHS': [ '/usr/lib -fsanitize=<(skia_sanitizer)']
, |
549 }], | 525 }], |
550 ], | 526 ], |
551 'CLANG_CXX_LIBRARY': 'libc++', | 527 'CLANG_CXX_LIBRARY': 'libc++', |
| 528 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', |
| 529 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 530 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 531 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe
-statics |
| 532 'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES', # -mssse3 |
| 533 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # -fvisibility=hi
dden |
| 534 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO', # -fvisibility-in
lines-hidden |
552 'GCC_CW_ASM_SYNTAX': 'NO', # remove -fasm-bl
ocks | 535 'GCC_CW_ASM_SYNTAX': 'NO', # remove -fasm-bl
ocks |
553 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # remove -mpascal
-strings | 536 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # remove -mpascal
-strings |
554 # Used by XCode and ninja | 537 'WARNING_CFLAGS': [ |
555 'OTHER_CPLUSPLUSFLAGS': [ | 538 '-Wall', |
556 '<@(common_cpp_flags)', | 539 '-Wextra', |
557 '<@(common_c_and_cpp_flags)', | 540 '-Winit-self', |
558 ], | 541 '-Wpointer-arith', |
559 'OTHER_CFLAGS': [ | 542 '-Wsign-compare', |
560 '<@(common_c_and_cpp_flags)', | 543 |
| 544 '-Wno-unused-parameter', |
561 ], | 545 ], |
562 }, | 546 }, |
563 # Used by cmake | |
564 'cflags': [ | |
565 '<@(common_c_and_cpp_flags)', | |
566 ], | |
567 'cflags_cc': [ | |
568 '<@(common_cpp_flags)', | |
569 ], | |
570 }, | 547 }, |
571 ], | 548 ], |
572 | 549 |
573 [ 'skia_os == "ios"', | 550 [ 'skia_os == "ios"', |
574 { | 551 { |
575 'defines': [ | 552 'defines': [ |
576 'SK_BUILD_FOR_IOS', | 553 'SK_BUILD_FOR_IOS', |
577 ], | 554 ], |
578 'conditions' : [ | 555 'conditions' : [ |
579 [ 'skia_warnings_as_errors', { | 556 [ 'skia_warnings_as_errors', { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'], | 665 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'], |
689 }, | 666 }, |
690 }], | 667 }], |
691 | 668 |
692 ], # end 'conditions' | 669 ], # end 'conditions' |
693 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for
more details | 670 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for
more details |
694 'xcode_settings': { | 671 'xcode_settings': { |
695 'SYMROOT': '<(DEPTH)/xcodebuild', | 672 'SYMROOT': '<(DEPTH)/xcodebuild', |
696 }, | 673 }, |
697 } | 674 } |
OLD | NEW |