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

Unified 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: Added mipsel clause back 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/secondary/third_party/nss/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index d0b3329baf7d862c57509ca2ce059a4db861e3e5..0241a63eb4c93763d71b73c18264bffe8f3d6e6f 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1058,6 +1058,22 @@ config("no_size_t_to_int_warning") {
}
}
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# supressing the rest of them. Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+ cflags = []
+ if (is_clang) {
+ cflags += [ "-Wno-incompatible-pointer-types" ]
+ } else if (current_cpu == "mipsel") {
+ cflags += [ "-w" ]
+ } else if (is_chromeos && current_cpu == "arm") {
+ cflags += [ "-w" ]
+ }
+}
+
# Optimization -----------------------------------------------------------------
#
# Note that BUILDCONFIG.gn sets up a variable "default_optimization_config"
« 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