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

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

Issue 1233913002: Refactor incompatible pointer type to a config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 years, 5 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
« no previous file with comments | « no previous file | build/secondary/third_party/nss/BUILD.gn » ('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) 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 if (current_cpu == "arm") { 7 if (current_cpu == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 # Note that this can be applied regardless of platform and architecture to 1058 # Note that this can be applied regardless of platform and architecture to
1059 # clean up the call sites. This will only apply the flag when necessary. 1059 # clean up the call sites. This will only apply the flag when necessary.
1060 # 1060 #
1061 # TODO(jschuh): crbug.com/167187 fix this and delete this config. 1061 # TODO(jschuh): crbug.com/167187 fix this and delete this config.
1062 config("no_size_t_to_int_warning") { 1062 config("no_size_t_to_int_warning") {
1063 if (is_win && current_cpu == "x64") { 1063 if (is_win && current_cpu == "x64") {
1064 cflags = [ "/wd4267" ] 1064 cflags = [ "/wd4267" ]
1065 } 1065 }
1066 } 1066 }
1067 1067
1068 # Some code presumes that pointers to structures/objects are compatible
1069 # regardless of whether what they point to is already known to be valid.
1070 # gcc 4.9 and earlier had no way of suppressing this warning without
1071 # supressing the rest of them. Here we centralize the identification of
1072 # the gcc 4.9 toolchains.
1073 config("no_incompatible_pointer_warnings") {
1074 cflags = []
1075 if (is_chromeos && current_cpu == "arm") {
1076 #cflags -= [ "-Werror", "-Wall" ]
Sam Clegg 2015/07/15 17:40:20 Remove this comment?
Peter Mayo 2015/07/15 18:09:37 Done.
1077 cflags += [ "-w" ]
1078 } else if (is_clang) {
Sam Clegg 2015/07/15 17:40:20 Wouldn't it make sense for check for is_clang cond
Peter Mayo 2015/07/15 18:09:37 Done.
1079 cflags += [ "-Wno-incompatible-pointer-types" ]
1080 }
1081 }
1082
1068 # Optimization ----------------------------------------------------------------- 1083 # Optimization -----------------------------------------------------------------
1069 # 1084 #
1070 # Note that BUILDCONFIG.gn sets up a variable "default_optimization_config" 1085 # Note that BUILDCONFIG.gn sets up a variable "default_optimization_config"
1071 # which it will assign to the config it implicitly applies to every target. If 1086 # which it will assign to the config it implicitly applies to every target. If
1072 # you want to override the optimization level for your target, remove this 1087 # you want to override the optimization level for your target, remove this
1073 # config (which will expand differently for debug or release builds), and then 1088 # config (which will expand differently for debug or release builds), and then
1074 # add back the one you want to override it with: 1089 # add back the one you want to override it with:
1075 # 1090 #
1076 # configs -= default_optimization_config 1091 # configs -= default_optimization_config
1077 # configs += [ "//build/config/compiler/optimize_max" ] 1092 # configs += [ "//build/config/compiler/optimize_max" ]
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 cflags += [ "-gsplit-dwarf" ] 1257 cflags += [ "-gsplit-dwarf" ]
1243 } 1258 }
1244 } 1259 }
1245 } 1260 }
1246 1261
1247 config("no_symbols") { 1262 config("no_symbols") {
1248 if (!is_win) { 1263 if (!is_win) {
1249 cflags = [ "-g0" ] 1264 cflags = [ "-g0" ]
1250 } 1265 }
1251 } 1266 }
OLDNEW
« no previous file with comments | « no previous file | build/secondary/third_party/nss/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698