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 340294 5fe7256db83c431a2535c26a724c02886f596b35
parent 340292 afecf1bb1e8dae8fb24257d393e0a2eae9f21f72
child 340295 bfcb6f917e87809b48494512917c09b33cea9beb
push id12933
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 03:52:06 +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'