Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: gyp/common_conditions.gypi

Issue 1619243003: Factor out xcode c/cpp settings into variables to apply to cmake builds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 'common_c_and_cpp_flags': [
476 '-mssse3',
477 '-fvisibility=hidden',
478 '-fvisibility-inlines-hidden',
479 '-Wall',
480 '-Wextra',
481 '-Winit-self',
482 '-Wpointer-arith',
483 '-Wsign-compare',
484 '-Wno-unused-parameter',
485 ],
486 'common_cpp_flags': [
487 '-fno-threadsafe-statics',
bsalomon 2016/01/22 18:26:24 wasn't totally sure which list this belonged in
mtklein 2016/01/22 18:45:21 Either place seems fine to me if it works, but I t
488 '-fno-exceptions',
489 '-fno-rtti',
490 '-std=c++11',
491 '-stdlib=libc++'
492 ],
493 },
474 'defines': [ 'SK_BUILD_FOR_MAC' ], 494 'defines': [ 'SK_BUILD_FOR_MAC' ],
475 'conditions': [ 495 'conditions': [
476 # ANGLE for mac hits -Wunneeded-internal-declaration if this isn't s et. 496 # ANGLE for mac hits -Wunneeded-internal-declaration if this isn't s et.
477 [ 'skia_angle', { 'defines': [ 'YY_NO_INPUT' ], } ], 497 [ 'skia_angle', { 'defines': [ 'YY_NO_INPUT' ], } ],
478 ], 498 ],
479 'configurations': { 499 'configurations': {
480 'Coverage': { 500 'Coverage': {
481 'xcode_settings': { 501 'xcode_settings': {
482 'GCC_OPTIMIZATION_LEVEL': '0', 502 'GCC_OPTIMIZATION_LEVEL': '0',
483 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', 503 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
(...skipping 28 matching lines...) Expand all
512 '-include <(skia_sanitizer_blacklist)', # Make every .cpp depend on it. 532 '-include <(skia_sanitizer_blacklist)', # Make every .cpp depend on it.
513 ], 533 ],
514 # We want to pass -fsanitize=... to our final link call, 534 # We want to pass -fsanitize=... to our final link call,
515 # but not to libtool. OTHER_LDFLAGS is passed to both. 535 # but not to libtool. OTHER_LDFLAGS is passed to both.
516 # To trick GYP into doing what we want, we'll piggyback on 536 # To trick GYP into doing what we want, we'll piggyback on
517 # LIBRARY_SEARCH_PATHS, producing "-L/usr/lib -fsanitize=...". 537 # LIBRARY_SEARCH_PATHS, producing "-L/usr/lib -fsanitize=...".
518 # The -L/usr/lib is redundant but innocuous: it's a default path. 538 # The -L/usr/lib is redundant but innocuous: it's a default path.
519 'LIBRARY_SEARCH_PATHS': [ '/usr/lib -fsanitize=<(skia_sanitizer)'] , 539 'LIBRARY_SEARCH_PATHS': [ '/usr/lib -fsanitize=<(skia_sanitizer)'] ,
520 }], 540 }],
521 ], 541 ],
522 '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 542 'GCC_CW_ASM_SYNTAX': 'NO', # remove -fasm-bl ocks
531 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # remove -mpascal -strings 543 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # remove -mpascal -strings
532 'WARNING_CFLAGS': [ 544 'OTHER_CPLUSPLUSFLAGS': [
mtklein 2016/01/22 18:45:21 # Used by Ninja and XCode.
bsalomon 2016/01/22 20:03:05 Done.
533 '-Wall', 545 '<@(common_cpp_flags)',
534 '-Wextra', 546 '<@(common_c_and_cpp_flags)',
535 '-Winit-self', 547 ],
536 '-Wpointer-arith', 548 'OTHER_CFLAGS': [
537 '-Wsign-compare', 549 '<@(common_c_and_cpp_flags)',
538
539 '-Wno-unused-parameter',
540 ], 550 ],
541 }, 551 },
552 'cflags': [
mtklein 2016/01/22 18:45:21 # Used by CMake.
bsalomon 2016/01/22 20:03:05 Done.
553 '<@(common_c_and_cpp_flags)',
554 ],
555 'cflags_cc': [
556 '<@(common_cpp_flags)',
557 ],
542 }, 558 },
543 ], 559 ],
544 560
545 [ 'skia_os == "ios"', 561 [ 'skia_os == "ios"',
546 { 562 {
547 'defines': [ 563 'defines': [
548 'SK_BUILD_FOR_IOS', 564 'SK_BUILD_FOR_IOS',
549 ], 565 ],
550 'conditions' : [ 566 'conditions' : [
551 [ 'skia_warnings_as_errors', { 567 [ 'skia_warnings_as_errors', {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'], 676 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'],
661 }, 677 },
662 }], 678 }],
663 679
664 ], # end 'conditions' 680 ], # end 'conditions'
665 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details 681 # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details
666 'xcode_settings': { 682 'xcode_settings': {
667 'SYMROOT': '<(DEPTH)/xcodebuild', 683 'SYMROOT': '<(DEPTH)/xcodebuild',
668 }, 684 },
669 } 685 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698