Bug 1256492 - Disable C4312 to unblock compilation on VS2015; r?jrmuizel draft
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 17:04:38 -0700
changeset 340067 2ceac5b0ad26f5e391fae8b099b1c8d4382314d8
parent 340066 7ab520fbbc7e8117ef7d7426bab8d4d7982c61b6
child 516139 67ec8584afde28cd4d7afdc23134be93b99aba89
push id12903
push usergszorc@mozilla.com
push dateTue, 15 Mar 2016 00:05:00 +0000
reviewersjrmuizel
bugs1256492
milestone48.0a1
Bug 1256492 - Disable C4312 to unblock compilation on VS2015; r?jrmuizel 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: 2NuNhdxDLXf
gfx/gl/moz.build
--- a/gfx/gl/moz.build
+++ b/gfx/gl/moz.build
@@ -170,8 +170,13 @@ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CFLAGS += CONFIG['TK_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 if CONFIG['CLANG_CXX']:
     CXXFLAGS += ['-Wshadow']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'reinterpret_cast': conversion from '*' to '*' of greater size
+    CXXFLAGS += ['-wd4312']