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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 # Disables. | 1037 # Disables. |
1038 "-Wno-missing-field-initializers", # "struct foo f = {0};" | 1038 "-Wno-missing-field-initializers", # "struct foo f = {0};" |
1039 "-Wno-unused-parameter", # Unused function parameters. | 1039 "-Wno-unused-parameter", # Unused function parameters. |
1040 ] | 1040 ] |
1041 } | 1041 } |
1042 | 1042 |
1043 if (is_chromeos) { | 1043 if (is_chromeos) { |
1044 # TODO(thakis): Remove, http://crbug.com/263960 | 1044 # TODO(thakis): Remove, http://crbug.com/263960 |
1045 if (is_clang) { | 1045 if (is_clang) { |
1046 cflags_cc += [ "-Wno-reserved-user-defined-literal" ] | 1046 cflags_cc += [ "-Wno-reserved-user-defined-literal" ] |
| 1047 |
| 1048 # TODO(thakis): Enable this, crbug.com/507717 |
| 1049 if (!is_nacl) { |
| 1050 cflags += [ "-Wno-shift-negative-value" ] |
| 1051 } |
1047 } else { | 1052 } else { |
1048 cflags_cc += [ "-Wno-literal-suffix" ] | 1053 cflags_cc += [ "-Wno-literal-suffix" ] |
1049 } | 1054 } |
1050 } | 1055 } |
1051 | 1056 |
1052 if (is_clang) { | 1057 if (is_clang) { |
1053 cflags += [ | 1058 cflags += [ |
1054 # TODO(thakis): Consider -Wloop-analysis (turns on | 1059 # TODO(thakis): Consider -Wloop-analysis (turns on |
1055 # -Wrange-loop-analysis too). | 1060 # -Wrange-loop-analysis too). |
1056 | 1061 |
(...skipping 14 matching lines...) Expand all Loading... |
1071 | 1076 |
1072 # TODO(thakis): This used to be implied by -Wno-unused-function, | 1077 # TODO(thakis): This used to be implied by -Wno-unused-function, |
1073 # which we no longer use. Check if it makes sense to remove | 1078 # which we no longer use. Check if it makes sense to remove |
1074 # this as well. http://crbug.com/316352 | 1079 # this as well. http://crbug.com/316352 |
1075 "-Wno-unneeded-internal-declaration", | 1080 "-Wno-unneeded-internal-declaration", |
1076 | 1081 |
1077 # TODO(hans): Get this cleaned up, http://crbug.com/428099 | 1082 # TODO(hans): Get this cleaned up, http://crbug.com/428099 |
1078 "-Wno-inconsistent-missing-override", | 1083 "-Wno-inconsistent-missing-override", |
1079 ] | 1084 ] |
1080 | 1085 |
1081 # Chrome's hermetic Clang compiler, NaCl's Clang compiler and Xcode's Clang | |
1082 # compiler will almost always have different versions. Certain flags may not | |
1083 # be recognized by one version or the other. | |
1084 if (!is_nacl) { | |
1085 # Flags NaCl (Clang 3.7) does not recognize. | |
1086 cflags += [ | |
1087 # TODO(thakis): Enable this, crbug.com/507717 | |
1088 "-Wno-shift-negative-value", | |
1089 ] | |
1090 } | |
1091 | |
1092 # use_xcode_clang only refers to the iOS toolchain, host binaries use | 1086 # use_xcode_clang only refers to the iOS toolchain, host binaries use |
1093 # chromium's clang always. | 1087 # chromium's clang always. |
1094 if (!is_nacl && (!use_xcode_clang || current_toolchain == host_toolchain)) { | 1088 if (!is_nacl && (!use_xcode_clang || current_toolchain == host_toolchain)) { |
1095 # Flags NaCl (Clang 3.7) and Xcode 7.3 (Clang clang-703.0.31) do not | 1089 # Flags NaCl (Clang 3.7) and Xcode 7.3 (Clang clang-703.0.31) do not |
1096 # recognize. | 1090 # recognize. |
1097 cflags += [ | 1091 cflags += [ |
1098 # TODO(thakis): https://crbug.com/604888 | 1092 # TODO(thakis): https://crbug.com/604888 |
1099 "-Wno-undefined-var-template", | 1093 "-Wno-undefined-var-template", |
1100 | 1094 |
1101 # TODO(thakis): https://crbug.com/617318 | 1095 # TODO(thakis): https://crbug.com/617318 |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 | 1709 |
1716 if (is_ios || is_mac) { | 1710 if (is_ios || is_mac) { |
1717 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1711 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1718 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1712 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1719 config("enable_arc") { | 1713 config("enable_arc") { |
1720 common_flags = [ "-fobjc-arc" ] | 1714 common_flags = [ "-fobjc-arc" ] |
1721 cflags_objc = common_flags | 1715 cflags_objc = common_flags |
1722 cflags_objcc = common_flags | 1716 cflags_objcc = common_flags |
1723 } | 1717 } |
1724 } | 1718 } |
OLD | NEW |