Bug 1256501 - Disable C4312 to unblock compilation on VS2015; r?aklotz draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 17:38:54 -0700
changeset 340088 312ea8f99889e27c3b21eb0f7813ab53ed902978
parent 340087 597b4cbe606ba441a86155276033c45080babe04
child 516142 2935ef06a04e1f95607c86cb8a8163ab38a0fb48
push id12908
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 00:39:17 +0000
reviewersaklotz
bugs1256501
milestone48.0a1
Bug 1256501 - Disable C4312 to unblock compilation on VS2015; r?aklotz 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 of fixing the underlying problem instead. But if it does land, hopefully the workaround is only temporary. MozReview-Commit-ID: FoYEsdZxi28
widget/windows/moz.build
--- a/widget/windows/moz.build
+++ b/widget/windows/moz.build
@@ -104,8 +104,13 @@ for var in ('MOZ_ENABLE_D3D10_LAYER'):
 
 RESFILE = 'widget.res'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 OS_LIBS += [
     'rpcrt4',
 ]
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'reinterpret_cast': conversion from 'int' to 'HANDLE' of greater size
+    CXXFLAGS += ['-wd4312']