| 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"
|
|
|