Bug 1256533 - Disable C4312 to unblock compilation on VS2015; r?jya draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 20:51:41 -0700
changeset 340297 ec5c0a4eba3d89d5f27e9e9b532639b71e328bde
parent 340296 e2591c8ea6edbc4f9cff47b1355fed92969043a4
child 340298 e9e8a735511af83ff6094bb7f914717a4449765c
push id12936
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 04:25:22 +0000
reviewersjya
bugs1256533
milestone48.0a1
Bug 1256533 - Disable C4312 to unblock compilation on VS2015; r?jya As part of unblocking building with VS2015u1 in automation, I'm mass disabling compiler warnings that are turned into errors. This is not the preferred mechanism to fix compilation warnings. So hopefully this patch never lands because someone insists on fixing the underlying problem instead. But if it does land, hopefully the workaround is only temporary. MozReview-Commit-ID: 7mzDrJKp3EM
dom/canvas/moz.build
dom/media/moz.build
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -178,8 +178,13 @@ LOCAL_INCLUDES += [
     '/layout/xul',
     '/media/libyuv/include',
 ]
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'type cast': conversion from '*' to '*' of greater size
+    CXXFLAGS += ['-wd4312']
\ No newline at end of file
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -320,9 +320,14 @@ if CONFIG['MOZ_GONK_MEDIACODEC']:
 include('/ipc/chromium/chromium-config.mozbuild')
 
 # Suppress some GCC warnings being treated as errors:
 #  - about attributes on forward declarations for types that are already
 #    defined, which complains about an important MOZ_EXPORT for android::AString
 if CONFIG['GNU_CC']:
   CXXFLAGS += ['-Wno-error=attributes']
 
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'type cast': conversion from '*' to '*' of greater size
+    CXXFLAGS += ['-wd4312']
+
 FINAL_LIBRARY = 'xul'