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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2780623003: Enable -Wdeprecated-register (except on CrOS and 32-bit Linux). (Closed)
Patch Set: rebase Created 3 years, 8 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
OLDNEW
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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 # This warns on using ints as initializers for floats in 1057 # This warns on using ints as initializers for floats in
1058 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), 1058 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
1059 # which happens in several places in chrome code. Not sure if 1059 # which happens in several places in chrome code. Not sure if
1060 # this is worth fixing. 1060 # this is worth fixing.
1061 "-Wno-c++11-narrowing", 1061 "-Wno-c++11-narrowing",
1062 1062
1063 # Warns on switches on enums that cover all enum values but 1063 # Warns on switches on enums that cover all enum values but
1064 # also contain a default: branch. Chrome is full of that. 1064 # also contain a default: branch. Chrome is full of that.
1065 "-Wno-covered-switch-default", 1065 "-Wno-covered-switch-default",
1066 1066
1067 # Clang considers the `register` keyword as deprecated, but e.g.
1068 # code generated by flex (used in angle) contains that keyword.
1069 # http://crbug.com/255186
1070 "-Wno-deprecated-register",
1071
1072 # TODO(thakis): This used to be implied by -Wno-unused-function, 1067 # TODO(thakis): This used to be implied by -Wno-unused-function,
1073 # which we no longer use. Check if it makes sense to remove 1068 # which we no longer use. Check if it makes sense to remove
1074 # this as well. http://crbug.com/316352 1069 # this as well. http://crbug.com/316352
1075 "-Wno-unneeded-internal-declaration", 1070 "-Wno-unneeded-internal-declaration",
1076 1071
1077 # TODO(hans): Get this cleaned up, http://crbug.com/428099 1072 # TODO(hans): Get this cleaned up, http://crbug.com/428099
1078 "-Wno-inconsistent-missing-override", 1073 "-Wno-inconsistent-missing-override",
1079 ] 1074 ]
1080 1075
1076 if (is_chromeos || (is_linux && target_cpu == "x86")) {
1077 cflags += [
1078 # TODO(thakis): Figure out why CrOS needs this, fix, remove.
1079 # https://crbug.com/806812
1080 # TODO(thakis): Remove from 32-bit Linux eventually, https://707084
1081 "-Wno-deprecated-register",
1082 ]
1083 }
1084
1081 # use_xcode_clang only refers to the iOS toolchain, host binaries use 1085 # use_xcode_clang only refers to the iOS toolchain, host binaries use
1082 # chromium's clang always. 1086 # chromium's clang always.
1083 if (!is_nacl && (!use_xcode_clang || current_toolchain == host_toolchain)) { 1087 if (!is_nacl && (!use_xcode_clang || current_toolchain == host_toolchain)) {
1084 # Flags NaCl (Clang 3.7) and Xcode 7.3 (Clang clang-703.0.31) do not 1088 # Flags NaCl (Clang 3.7) and Xcode 7.3 (Clang clang-703.0.31) do not
1085 # recognize. 1089 # recognize.
1086 cflags += [ 1090 cflags += [
1087 # TODO(thakis): https://crbug.com/604888 1091 # TODO(thakis): https://crbug.com/604888
1088 "-Wno-undefined-var-template", 1092 "-Wno-undefined-var-template",
1089 1093
1090 # TODO(thakis): https://crbug.com/617318 1094 # TODO(thakis): https://crbug.com/617318
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 1713
1710 if (is_ios || is_mac) { 1714 if (is_ios || is_mac) {
1711 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1715 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1712 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1716 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1713 config("enable_arc") { 1717 config("enable_arc") {
1714 common_flags = [ "-fobjc-arc" ] 1718 common_flags = [ "-fobjc-arc" ]
1715 cflags_objc = common_flags 1719 cflags_objc = common_flags
1716 cflags_objcc = common_flags 1720 cflags_objcc = common_flags
1717 } 1721 }
1718 } 1722 }
OLDNEW
« no previous file with comments | « base/third_party/dmg_fp/g_fmt.cc ('k') | third_party/WebKit/Source/build/scripts/make_css_property_names.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698