Allow compiler warnings for MinGW in certain whitelisted directories: gfx, ipc/chromium draft
authorTom Ritter <tom@mozilla.com>
Fri, 06 Oct 2017 07:59:39 -0500
changeset 676627 e73d73ff926cdadef255dd944f04fc553f370ba1
parent 676161 11ab07148310fa91047f56082c8ac6cf4e9ceea0
child 676628 2f7a3f396216f7d4223634680a6af3647e434acc
child 676635 f21105ae18082c5197969207bd712642c3728174
push id83553
push userbmo:tom@mozilla.com
push dateMon, 09 Oct 2017 06:14:39 +0000
milestone58.0a1
Allow compiler warnings for MinGW in certain whitelisted directories: gfx, ipc/chromium MozReview-Commit-ID: 8HickWgg9MY
gfx/2d/moz.build
gfx/gl/moz.build
gfx/layers/moz.build
gfx/moz.build
ipc/chromium/moz.build
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -214,16 +214,20 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
         'SwizzleNEON.cpp',
     ]
     SOURCES['BlurNEON.cpp'].flags += CONFIG['NEON_FLAGS']
     SOURCES['LuminanceNEON.cpp'].flags += CONFIG['NEON_FLAGS']
     SOURCES['SwizzleNEON.cpp'].flags += CONFIG['NEON_FLAGS']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+# We allow compiler warnings in gfx for the MinGW build for now
+if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] == 'gcc':
+    ALLOW_COMPILER_WARNINGS = True
+
 FINAL_LIBRARY = 'xul'
 
 for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
     DEFINES[var] = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
     DEFINES['MOZ_ENABLE_FREETYPE'] = True
 
--- a/gfx/gl/moz.build
+++ b/gfx/gl/moz.build
@@ -141,16 +141,20 @@ UNIFIED_SOURCES += [
     'SharedSurfaceEGL.cpp',
     'SharedSurfaceGL.cpp',
     'SurfaceTypes.cpp',
     'TextureImageEGL.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+# We allow compiler warnings for the MinGW build for now
+if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] == 'gcc':
+    ALLOW_COMPILER_WARNINGS = True
+
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']:
     DEFINES['MOZ_D3DCOMPILER_VISTA_DLL'] = CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -517,16 +517,20 @@ IPDL_SOURCES += [
     'ipc/PUiCompositorController.ipdl',
     'ipc/PVideoBridge.ipdl',
     'ipc/PWebRenderBridge.ipdl',
     'ipc/WebRenderMessages.ipdlh',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+# We allow compiler warnings for the MinGW build for now
+if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] == 'gcc':
+    ALLOW_COMPILER_WARNINGS = True
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
   GENERATED_FILES = [
       'CompositorD3D11Shaders.h',
       'MLGShaders.h',
   ]
 
   d3d11_shaders = GENERATED_FILES['CompositorD3D11Shaders.h']
   d3d11_shaders.script = 'd3d11/genshaders.py'
--- a/gfx/moz.build
+++ b/gfx/moz.build
@@ -23,16 +23,20 @@ DIRS += [
     'ots/src',
     'thebes',
     'ipc',
     'vr',
     'config',
     'webrender_bindings',
 ]
 
+# We allow compiler warnings in gfx for the MinGW build for now
+if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] == 'gcc':
+    ALLOW_COMPILER_WARNINGS = True
+
 if CONFIG['MOZ_ENABLE_SKIA']:
     DIRS += ['skia']
 
 if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
      DIRS += ['sfntly/cpp/src']
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
--- a/ipc/chromium/moz.build
+++ b/ipc/chromium/moz.build
@@ -2,16 +2,20 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 libevent_path_prefix = 'src/third_party'
 include(libevent_path_prefix + '/libeventcommon.mozbuild')
 
+# We allow compiler warnings for the MinGW build for now
+if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] == 'gcc':
+    ALLOW_COMPILER_WARNINGS = True
+
 UNIFIED_SOURCES += [
     'src/base/at_exit.cc',
     'src/base/command_line.cc',
     'src/base/file_path.cc',
     'src/base/file_util.cc',
     'src/base/histogram.cc',
     'src/base/logging.cc',
     'src/base/message_loop.cc',