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

Side by Side Diff: build/common.gypi

Issue 12310041: experiment with -Wimplicit-fallthrough Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « base/third_party/icu/icu_utf.cc ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 2463 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 ], 2474 ],
2475 }], 2475 }],
2476 ['chromium_code==0', { 2476 ['chromium_code==0', {
2477 'conditions': [ 2477 'conditions': [
2478 [ 'os_posix==1 and OS!="mac" and OS!="ios"', { 2478 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
2479 # We don't want to get warnings from third-party code, 2479 # We don't want to get warnings from third-party code,
2480 # so remove any existing warning-enabling flags like -Wall. 2480 # so remove any existing warning-enabling flags like -Wall.
2481 'cflags!': [ 2481 'cflags!': [
2482 '-Wall', 2482 '-Wall',
2483 '-Wextra', 2483 '-Wextra',
2484 '-Wimplicit-fallthrough',
2484 ], 2485 ],
2485 'cflags_cc': [ 2486 'cflags_cc': [
2486 # Don't warn about hash_map in third-party code. 2487 # Don't warn about hash_map in third-party code.
2487 '-Wno-deprecated', 2488 '-Wno-deprecated',
2488 ], 2489 ],
2489 'cflags': [ 2490 'cflags': [
2490 # Don't warn about printf format problems. 2491 # Don't warn about printf format problems.
2491 # This is off by default in gcc but on in Ubuntu's gcc(!). 2492 # This is off by default in gcc but on in Ubuntu's gcc(!).
2492 '-Wno-format', 2493 '-Wno-format',
2493 ], 2494 ],
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 ], 2536 ],
2536 }], 2537 }],
2537 # TODO(darin): Unfortunately, some third_party code depends on base. 2538 # TODO(darin): Unfortunately, some third_party code depends on base.
2538 [ 'OS=="win" and component=="shared_library"', { 2539 [ 'OS=="win" and component=="shared_library"', {
2539 'msvs_disabled_warnings': [ 2540 'msvs_disabled_warnings': [
2540 4251, # class 'std::xx' needs to have dll-interface. 2541 4251, # class 'std::xx' needs to have dll-interface.
2541 ], 2542 ],
2542 }], 2543 }],
2543 [ 'OS=="mac" or OS=="ios"', { 2544 [ 'OS=="mac" or OS=="ios"', {
2544 'xcode_settings': { 2545 'xcode_settings': {
2545 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], 2546 'WARNING_CFLAGS!': ['-Wall', '-Wextra', '-Wimplicit-fallthrough'],
2546 }, 2547 },
2547 'conditions': [ 2548 'conditions': [
2548 ['buildtype=="Official"', { 2549 ['buildtype=="Official"', {
2549 'xcode_settings': { 2550 'xcode_settings': {
2550 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror 2551 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2551 }, 2552 },
2552 }], 2553 }],
2553 ], 2554 ],
2554 }], 2555 }],
2555 [ 'OS=="ios"', { 2556 [ 'OS=="ios"', {
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
3299 ], 3300 ],
3300 'ldflags': [ 3301 'ldflags': [
3301 '--sysroot=<(sysroot)', 3302 '--sysroot=<(sysroot)',
3302 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', 3303 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
3303 ], 3304 ],
3304 }]] 3305 }]]
3305 }], 3306 }],
3306 ['clang==1', { 3307 ['clang==1', {
3307 'cflags': [ 3308 'cflags': [
3308 '-Wheader-hygiene', 3309 '-Wheader-hygiene',
3310 '-Wimplicit-fallthrough',
3309 3311
3310 # Don't die on dtoa code that uses a char as an array index. 3312 # Don't die on dtoa code that uses a char as an array index.
3311 '-Wno-char-subscripts', 3313 '-Wno-char-subscripts',
3312 3314
3313 # TODO(thakis): This used to be implied by -Wno-unused-function, 3315 # TODO(thakis): This used to be implied by -Wno-unused-function,
3314 # which we no longer use. Check if it makes sense to remove 3316 # which we no longer use. Check if it makes sense to remove
3315 # this as well. http://crbug.com/316352 3317 # this as well. http://crbug.com/316352
3316 '-Wno-unneeded-internal-declaration', 3318 '-Wno-unneeded-internal-declaration',
3317 3319
3318 # Warns on switches on enums that cover all enum values but 3320 # Warns on switches on enums that cover all enum values but
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
4003 # TODO(thakis): Eventually switch this to c++11 instead of 4005 # TODO(thakis): Eventually switch this to c++11 instead of
4004 # gnu++11 (once typeof can be removed, which is blocked on c++11 4006 # gnu++11 (once typeof can be removed, which is blocked on c++11
4005 # being available everywhere). 4007 # being available everywhere).
4006 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11 4008 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11
4007 # Warn if automatic synthesis is triggered with 4009 # Warn if automatic synthesis is triggered with
4008 # the -Wobjc-missing-property-synthesis flag. 4010 # the -Wobjc-missing-property-synthesis flag.
4009 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', 4011 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
4010 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 4012 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4011 'WARNING_CFLAGS': [ 4013 'WARNING_CFLAGS': [
4012 '-Wheader-hygiene', 4014 '-Wheader-hygiene',
4015 '-Wimplicit-fallthrough',
4013 4016
4014 # This warns on using ints as initializers for floats in 4017 # This warns on using ints as initializers for floats in
4015 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), 4018 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
4016 # which happens in several places in chrome code. Not sure if 4019 # which happens in several places in chrome code. Not sure if
4017 # this is worth fixing. 4020 # this is worth fixing.
4018 '-Wno-c++11-narrowing', 4021 '-Wno-c++11-narrowing',
4019 4022
4020 # Don't die on dtoa code that uses a char as an array index. 4023 # Don't die on dtoa code that uses a char as an array index.
4021 # This is required solely for base/third_party/dmg_fp/dtoa.cc. 4024 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4022 '-Wno-char-subscripts', 4025 '-Wno-char-subscripts',
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
4781 # settings in target dicts. SYMROOT is a special case, because many other 4784 # settings in target dicts. SYMROOT is a special case, because many other
4782 # Xcode variables depend on it, including variables such as 4785 # Xcode variables depend on it, including variables such as
4783 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 4786 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4784 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 4787 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4785 # files to appear (when present) in the UI as actual files and not red 4788 # files to appear (when present) in the UI as actual files and not red
4786 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 4789 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4787 # and therefore SYMROOT, needs to be set at the project level. 4790 # and therefore SYMROOT, needs to be set at the project level.
4788 'SYMROOT': '<(DEPTH)/xcodebuild', 4791 'SYMROOT': '<(DEPTH)/xcodebuild',
4789 }, 4792 },
4790 } 4793 }
OLDNEW
« no previous file with comments | « base/third_party/icu/icu_utf.cc ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698