Chromium Code Reviews| 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/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
| 8 import("//build/config/compiler/compiler.gni") | 8 import("//build/config/compiler/compiler.gni") |
| 9 import("//build/config/nacl/config.gni") | 9 import("//build/config/nacl/config.gni") |
| 10 import("//build/toolchain/cc_wrapper.gni") | 10 import("//build/toolchain/cc_wrapper.gni") |
| (...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1052 # This warns on using ints as initializers for floats in | 1052 # This warns on using ints as initializers for floats in |
| 1053 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), | 1053 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 1054 # which happens in several places in chrome code. Not sure if | 1054 # which happens in several places in chrome code. Not sure if |
| 1055 # this is worth fixing. | 1055 # this is worth fixing. |
| 1056 "-Wno-c++11-narrowing", | 1056 "-Wno-c++11-narrowing", |
| 1057 | 1057 |
| 1058 # Warns on switches on enums that cover all enum values but | 1058 # Warns on switches on enums that cover all enum values but |
| 1059 # also contain a default: branch. Chrome is full of that. | 1059 # also contain a default: branch. Chrome is full of that. |
| 1060 "-Wno-covered-switch-default", | 1060 "-Wno-covered-switch-default", |
| 1061 | 1061 |
| 1062 # Clang considers the `register` keyword as deprecated, but e.g. | |
| 1063 # code generated by flex (used in angle) contains that keyword. | |
| 1064 # http://crbug.com/255186 | |
| 1065 "-Wno-deprecated-register", | |
| 1066 | |
| 1067 # TODO(thakis): This used to be implied by -Wno-unused-function, | 1062 # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 1068 # which we no longer use. Check if it makes sense to remove | 1063 # which we no longer use. Check if it makes sense to remove |
| 1069 # this as well. http://crbug.com/316352 | 1064 # this as well. http://crbug.com/316352 |
| 1070 "-Wno-unneeded-internal-declaration", | 1065 "-Wno-unneeded-internal-declaration", |
| 1071 | 1066 |
| 1072 # TODO(hans): Get this cleaned up, http://crbug.com/428099 | 1067 # TODO(hans): Get this cleaned up, http://crbug.com/428099 |
| 1073 "-Wno-inconsistent-missing-override", | 1068 "-Wno-inconsistent-missing-override", |
| 1074 ] | 1069 ] |
| 1075 | 1070 |
| 1071 if (is_chromeos || (is_linux && target_cpu == "x86")) { | |
| 1072 cflags += [ | |
| 1073 # TODO(thakis): Figure out why CrOS needs this, fix, remove. | |
| 1074 # https://crbug.com/806812 | |
| 1075 # TODO(thakis): Remove from 32-bit Linux eventually, https://707084 | |
|
Lei Zhang
2017/03/31 00:55:52
Missing crbug.com/
Nico
2017/03/31 01:22:59
D'oh, will fix in follow up
| |
| 1076 "-Wno-deprecated-register", | |
| 1077 ] | |
| 1078 } | |
| 1079 | |
| 1076 # Chrome's hermetic Clang compiler, NaCl's Clang compiler and Xcode's Clang | 1080 # Chrome's hermetic Clang compiler, NaCl's Clang compiler and Xcode's Clang |
| 1077 # compiler will almost always have different versions. Certain flags may not | 1081 # compiler will almost always have different versions. Certain flags may not |
| 1078 # be recognized by one version or the other. | 1082 # be recognized by one version or the other. |
| 1079 if (!is_nacl) { | 1083 if (!is_nacl) { |
| 1080 # Flags NaCl (Clang 3.7) does not recognize. | 1084 # Flags NaCl (Clang 3.7) does not recognize. |
| 1081 cflags += [ | 1085 cflags += [ |
| 1082 # TODO(thakis): Enable this, crbug.com/507717 | 1086 # TODO(thakis): Enable this, crbug.com/507717 |
| 1083 "-Wno-shift-negative-value", | 1087 "-Wno-shift-negative-value", |
| 1084 ] | 1088 ] |
| 1085 } | 1089 } |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1715 | 1719 |
| 1716 if (is_ios || is_mac) { | 1720 if (is_ios || is_mac) { |
| 1717 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1721 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1718 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1722 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1719 config("enable_arc") { | 1723 config("enable_arc") { |
| 1720 common_flags = [ "-fobjc-arc" ] | 1724 common_flags = [ "-fobjc-arc" ] |
| 1721 cflags_objc = common_flags | 1725 cflags_objc = common_flags |
| 1722 cflags_objcc = common_flags | 1726 cflags_objcc = common_flags |
| 1723 } | 1727 } |
| 1724 } | 1728 } |
| OLD | NEW |