OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 if (!is_clang) { | 907 if (!is_clang) { |
908 cflags_cc += [ | 908 cflags_cc += [ |
909 # See comment for -Wno-c++11-narrowing. | 909 # See comment for -Wno-c++11-narrowing. |
910 "-Wno-narrowing", | 910 "-Wno-narrowing", |
911 ] | 911 ] |
912 | 912 |
913 # Don't warn about the "typedef 'foo' locally defined but not used" | 913 # Don't warn about the "typedef 'foo' locally defined but not used" |
914 # for gcc 4.8. | 914 # for gcc 4.8. |
915 # TODO: remove this flag once all builds work. See crbug.com/227506 | 915 # TODO: remove this flag once all builds work. See crbug.com/227506 |
916 cflags += [ "-Wno-unused-local-typedefs" ] | 916 cflags += [ "-Wno-unused-local-typedefs" ] |
| 917 |
| 918 # Don't warn about "maybe" uninitialized. Clang doesn't include this |
| 919 # in -Wall but gcc does, and it gives false positives. |
| 920 cflags += [ "-Wno-maybe-uninitialized" ] |
917 } | 921 } |
918 } | 922 } |
919 | 923 |
920 # Common Clang and GCC warning setup. | 924 # Common Clang and GCC warning setup. |
921 if (!is_win || is_clang) { | 925 if (!is_win || is_clang) { |
922 cflags += [ | 926 cflags += [ |
923 # Disables. | 927 # Disables. |
924 "-Wno-missing-field-initializers", # "struct foo f = {0};" | 928 "-Wno-missing-field-initializers", # "struct foo f = {0};" |
925 "-Wno-unused-parameter", # Unused function parameters. | 929 "-Wno-unused-parameter", # Unused function parameters. |
926 ] | 930 ] |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 | 1431 |
1428 if (is_ios || is_mac) { | 1432 if (is_ios || is_mac) { |
1429 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1433 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1430 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1434 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1431 config("enable_arc") { | 1435 config("enable_arc") { |
1432 common_flags = [ "-fobjc-arc" ] | 1436 common_flags = [ "-fobjc-arc" ] |
1433 cflags_objc = common_flags | 1437 cflags_objc = common_flags |
1434 cflags_objcc = common_flags | 1438 cflags_objcc = common_flags |
1435 } | 1439 } |
1436 } | 1440 } |
OLD | NEW |