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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
427 }, | 427 }, |
428 'conditions' : [ | 428 'conditions' : [ |
429 [ 'skia_shared_lib', { | 429 [ 'skia_shared_lib', { |
430 'defines': [ | 430 'defines': [ |
431 'SKIA_DLL', | 431 'SKIA_DLL', |
432 'SKIA_IMPLEMENTATION=1', | 432 'SKIA_IMPLEMENTATION=1', |
433 ], | 433 ], |
434 }], | 434 }], |
435 # Enable asan, tsan, etc. | 435 # Enable asan, tsan, etc. |
436 [ 'skia_sanitizer', { | 436 [ 'skia_sanitizer', { |
437 'cflags_cc!': [ '-fno-rtti' ], # vptr needs r tti | |
437 'cflags': [ | 438 'cflags': [ |
438 '-fsanitize=<(skia_sanitizer)', # Turn on sani tizers. | 439 '-fsanitize=<(skia_sanitizer)', # Turn on sani tizers. |
439 '-fno-sanitize-recover=<(skia_sanitizer)', # Make any fai lure fatal. | 440 '-fno-sanitize-recover=<(skia_sanitizer)', # Make any fai lure fatal. |
440 '-fsanitize-blacklist=<(skia_sanitizer_blacklist)', # Compile in o ur blacklist. | 441 '-fsanitize-blacklist=<(skia_sanitizer_blacklist)', # Compile in o ur blacklist. |
441 '-include <(skia_sanitizer_blacklist)', # Make every . cpp depend on it. | 442 '-include <(skia_sanitizer_blacklist)', # Make every . cpp depend on it. |
442 ], | 443 ], |
443 'cflags_cc!': [ | 444 'ldflags': [ '-fsanitize=<(skia_sanitizer)' ], |
444 '-fno-rtti' | |
445 ], | |
446 'ldflags': [ | |
447 '-fsanitize=<(skia_sanitizer)', | |
448 ], | |
449 'conditions' : [ | 445 'conditions' : [ |
450 [ 'skia_sanitizer == "thread"', { | 446 [ 'skia_sanitizer == "thread"', { |
451 'defines': [ 'THREAD_SANITIZER' ], | 447 'defines': [ 'THREAD_SANITIZER' ], |
452 }], | 448 }], |
453 ], | 449 ], |
454 }], | 450 }], |
455 [ 'skia_clang_build', { | 451 [ 'skia_clang_build', { |
456 'cflags_cc': [ | 452 'cflags_cc': [ |
457 '-Wno-unknown-warning-option', # Allows unknown warnings. | 453 '-Wno-unknown-warning-option', # Allows unknown warnings. |
458 '-Wno-deprecated', # From Qt, via debugger (older C lang). | 454 '-Wno-deprecated', # From Qt, via debugger (older C lang). |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
500 'conditions': [ | 496 'conditions': [ |
501 [ 'skia_fast', { 'WARNING_CFLAGS': [ '<@(skia_fast_flags)' ] } ], | 497 [ 'skia_fast', { 'WARNING_CFLAGS': [ '<@(skia_fast_flags)' ] } ], |
502 [ 'skia_warnings_as_errors', { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES' }], | 498 [ 'skia_warnings_as_errors', { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES' }], |
503 [ 'skia_arch_type == "x86"', { 'ARCHS': ['i386'] }], | 499 [ 'skia_arch_type == "x86"', { 'ARCHS': ['i386'] }], |
504 [ 'skia_arch_type == "x86_64"', { 'ARCHS': ['x86_64'] }], | 500 [ 'skia_arch_type == "x86_64"', { 'ARCHS': ['x86_64'] }], |
505 [ 'skia_osx_deployment_target==""', { | 501 [ 'skia_osx_deployment_target==""', { |
506 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld. | 502 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacos-version-min, passed in env to ld. |
507 }, { | 503 }, { |
508 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)', | 504 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)', |
509 }], | 505 }], |
506 [ 'skia_sanitizer', { | |
507 'GCC_ENABLE_CPP_RTTI': 'YES', # vptr needs rtti | |
508 'OTHER_CFLAGS': [ | |
509 '-fsanitize=<(skia_sanitizer)', # Turn on sa nitizers. | |
510 '-fno-sanitize-recover=<(skia_sanitizer)', # Make any f ailure fatal. | |
511 '-fsanitize-blacklist=<(skia_sanitizer_blacklist)', # Compile in our blacklist. | |
512 '-include <(skia_sanitizer_blacklist)', # Make every .cpp depend on it. | |
513 ], | |
514 # We want to pass -fsanitize=... to our final link call, | |
515 # but not to libtool. OTHER_LDFLAGS is passed to both. | |
Nico
2016/05/13 17:06:02
...or you could check if _type is not static_libra
| |
516 # To trick GYP into doing what we want, we'll piggyback on | |
517 # LIBRARY_SEARCH_PATHS, producing "-L/usr/lib -fsanitize=...". | |
518 # The -L/usr/lib is redundant but innocuous: it's a default path. | |
519 'LIBRARY_SEARCH_PATHS': [ '/usr/lib -fsanitize=<(skia_sanitizer)'] , | |
520 }], | |
510 ], | 521 ], |
511 'CLANG_CXX_LIBRARY': 'libc++', | 522 'CLANG_CXX_LIBRARY': 'libc++', |
512 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', | 523 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', |
513 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions | 524 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
514 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti | 525 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
515 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe -statics | 526 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe -statics |
516 'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES', # -mssse3 | 527 'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES', # -mssse3 |
517 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # -fvisibility=hi dden | 528 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # -fvisibility=hi dden |
518 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO', # -fvisibility-in lines-hidden | 529 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO', # -fvisibility-in lines-hidden |
519 'GCC_CW_ASM_SYNTAX': 'NO', # remove -fasm-bl ocks | 530 'GCC_CW_ASM_SYNTAX': 'NO', # remove -fasm-bl ocks |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
649 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'], | 660 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'], |
650 }, | 661 }, |
651 }], | 662 }], |
652 | 663 |
653 ], # end 'conditions' | 664 ], # end 'conditions' |
654 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details | 665 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details |
655 'xcode_settings': { | 666 'xcode_settings': { |
656 'SYMROOT': '<(DEPTH)/xcodebuild', | 667 'SYMROOT': '<(DEPTH)/xcodebuild', |
657 }, | 668 }, |
658 } | 669 } |
OLD | NEW |