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 340309 51e145730f37c17a53c3ac4f66d4615f5253c45a
parent 340308 60d01e8d9b034023a7c46908b35888c52fad71b5
child 340310 10111cf6490c785bdfeafe6a5566c1c4f4b44c9c
push id12938
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 04:41:37 +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'