Bug 991451 - Suppress clang and gcc warnings in third-party code: Skia. r=gw280
authorChris Peterson <cpeterson@mozilla.com>
Mon, 31 Mar 2014 23:27:31 -0700
changeset 195817 14b5fbfa2163b634fcdad1249441e0fb789dc0ef
parent 195816 cb0b6f2f3ca909dd8c075bb4ac653d8fb4291a54
child 195818 e35851f07b6703bee6830b4ebcd2990f41629238
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw280
bugs991451
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 991451 - Suppress clang and gcc warnings in third-party code: Skia. r=gw280
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -89,16 +89,24 @@ if CONFIG['INTEL_ARCHITECTURE'] and CONF
     SOURCES['trunk/src/opts/SkMorphology_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
     SOURCES['trunk/src/opts/SkUtils_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
 elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC'] and CONFIG['BUILD_ARM_NEON']:
     DEFINES['__ARM_HAVE_OPTIONAL_NEON_SUPPORT'] = 1
     DEFINES['USE_ANDROID_NDK_CPU_FEATURES'] = 0
 
 DEFINES['SKIA_IMPLEMENTATION'] = 1
 DEFINES['GR_IMPLEMENTATION'] = 1
+
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += [
+        '-Wno-overloaded-virtual',
+        '-Wno-unused-function',
+    ]
+    if not CONFIG['CLANG_CXX']:
+        CXXFLAGS += ['-Wno-logical-op']
 """
 
 import json
 
 platforms = ['linux', 'mac', 'android', 'win']
 
 custom_includes = {
   'trunk/src/ports/SkAtomics_android.h': True,
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -885,8 +885,16 @@ if CONFIG['INTEL_ARCHITECTURE'] and CONF
     SOURCES['trunk/src/opts/SkMorphology_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
     SOURCES['trunk/src/opts/SkUtils_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
 elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC'] and CONFIG['BUILD_ARM_NEON']:
     DEFINES['__ARM_HAVE_OPTIONAL_NEON_SUPPORT'] = 1
     DEFINES['USE_ANDROID_NDK_CPU_FEATURES'] = 0
 
 DEFINES['SKIA_IMPLEMENTATION'] = 1
 DEFINES['GR_IMPLEMENTATION'] = 1
+
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += [
+        '-Wno-overloaded-virtual',
+        '-Wno-unused-function',
+    ]
+    if not CONFIG['CLANG_CXX']:
+        CXXFLAGS += ['-Wno-logical-op']