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 340305 c4c20642d0747cf96d1c7ffc0ea8e0920ae0d73f
parent 340304 aa3ddf986ea0385734a717ce74cef22309380da6
child 340306 aa78e1892cb0f8a45a715345326f3c5988624967
push id12938
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 04:41:37 +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']