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
--- 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'