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