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

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: 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 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 2c0b455add3903beeaa90c391e9e26ecc1e4299d..c02e3e7dc65035aa40091548981af94a7755e8c0 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1065,6 +1065,21 @@ 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_chromeos && current_cpu == "arm") {
+ #cflags -= [ "-Werror", "-Wall" ]
Sam Clegg 2015/07/15 17:40:20 Remove this comment?
Peter Mayo 2015/07/15 18:09:37 Done.
+ cflags += [ "-w" ]
+ } 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.
+ cflags += [ "-Wno-incompatible-pointer-types" ]
+ }
+}
+
# 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