Bug 1284406 part 1 - Move warning suppression of C4577 to global level. r=glandium draft
authorXidorn Quan <me@upsuper.org>
Thu, 07 Jul 2016 10:12:28 +1000
changeset 388832 e35f507952ccb081e77d5ba78c1b0d2ed566ac73
parent 388831 97eb0e11fceb0ebe7513a2926781835dd2628bb5
child 388833 46edb316cd7ced02794cd99037aca7a47e26d457
push id23245
push userxquan@mozilla.com
push dateMon, 18 Jul 2016 05:36:23 +0000
reviewersglandium
bugs1284406
milestone50.0a1
Bug 1284406 part 1 - Move warning suppression of C4577 to global level. r=glandium MozReview-Commit-ID: 66TD5A3L73D
dom/indexedDB/moz.build
gfx/thebes/moz.build
intl/unicharutil/util/internal/moz.build
layout/forms/moz.build
netwerk/dns/moz.build
old-configure.in
--- a/dom/indexedDB/moz.build
+++ b/dom/indexedDB/moz.build
@@ -95,20 +95,16 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['GNU_CC']:
     # Suppress gcc warning about a comparison being always false due to the
     # range of the data type
     SOURCES['Key.cpp'].flags += ['-Wno-error=type-limits']
     CXXFLAGS += ['-Wno-error=shadow']
 
-if CONFIG['_MSC_VER']:
-    # This is intended as a temporary hack to support building with VS2015.
-    CXXFLAGS += ['-wd4577']
-
 LOCAL_INCLUDES += [
     '/db/sqlite3/src',
     '/dom/base',
     '/dom/storage',
     '/dom/workers',
     '/ipc/glue',
     '/xpcom/build',
     '/xpcom/threads',
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -286,12 +286,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 DEFINES['GRAPHITE2_STATIC'] = True
 
 if CONFIG['CLANG_CXX']:
     # Suppress warnings from Skia header files.
     SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
-
-if CONFIG['_MSC_VER']:
-    # This is intended as a temporary hack to support building with VS2015.
-    CXXFLAGS += ['-wd4577']
--- a/intl/unicharutil/util/internal/moz.build
+++ b/intl/unicharutil/util/internal/moz.build
@@ -18,14 +18,8 @@ LOCAL_INCLUDES += [
     '..',
 ]
 
 if CONFIG['ENABLE_INTL_API']:
     CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
     LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 
 DIST_INSTALL = True
-
-if CONFIG['_MSC_VER']:
-    # This is intended as a temporary hack to support building with VS2015.
-    # 'noexcept' used with no exception handling mode specified;
-    # termination on exception is not guaranteed. Specify /EHsc
-    CXXFLAGS += ['-wd4577']
--- a/layout/forms/moz.build
+++ b/layout/forms/moz.build
@@ -55,14 +55,8 @@ LOCAL_INCLUDES += [
 if CONFIG['ENABLE_INTL_API']:
     # nsNumberControlFrame.cpp requires ICUUtils.h which in turn requires
     # i18n/unum.h
     CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
     LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wno-error=shadow']
-
-if CONFIG['_MSC_VER']:
-    # This is intended as a temporary hack to support building with VS2015.
-    # 'noexcept' used with no exception handling mode specified;
-    # termination on exception is not guaranteed. Specify /EHsc
-    CXXFLAGS += ['-wd4577']
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -74,15 +74,8 @@ if CONFIG['ENABLE_INTL_API']:
     USE_LIBS += ['icu']
 else:
     UNIFIED_SOURCES += [
         'nameprep.c',
     ]
 
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wno-error=shadow']
-
-if CONFIG['_MSC_VER']:
-    # This is intended as a temporary hack to support building with VS2015.
-    # icu\source\common\unicode/ucasemap.h(93): warning C4577:
-    # 'noexcept' used with no exception handling mode specified;
-    # termination on exception is not guaranteed. Specify /EHsc from unified dns
-    CXXFLAGS += ['-wd4577']
--- a/old-configure.in
+++ b/old-configure.in
@@ -334,16 +334,21 @@ case "$target" in
             CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-"
 
             # https://connect.microsoft.com/VisualStudio/feedback/details/888527/warnings-on-dbghelp-h
             # for dbghelp.h, imagehlp.h, and shobj.h
             # C4091: 'typedef ': ignored on left of '' when no variable is declared
             CFLAGS="$CFLAGS -wd4091"
             CXXFLAGS="$CXXFLAGS -wd4091"
 
+            # This is intended as a temporary hack to support building with VS2015.
+            # 'noexcept' used with no exception handling mode specified;
+            # termination on exception is not guaranteed. Specify /EHsc
+            CXXFLAGS="$CXXFLAGS -wd4577"
+
             if test -n "$WIN_UCRT_REDIST_DIR"; then
               if test ! -d "$WIN_UCRT_REDIST_DIR"; then
                 AC_MSG_ERROR([Invalid Windows UCRT Redist directory: ${WIN_UCRT_REDIST_DIR}])
               fi
               WIN_UCRT_REDIST_DIR=`cd "$WIN_UCRT_REDIST_DIR" && pwd -W`
             fi
             ;;
         esac