diff --git a/dom/media/systemservices/moz.build b/dom/media/systemservices/moz.build index 72efa2c86887..341e5a679a73 100644 --- a/dom/media/systemservices/moz.build +++ b/dom/media/systemservices/moz.build @@ -48,12 +48,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': UNIFIED_SOURCES += ['OSXRunLoopSingleton.cpp'] EXPORTS += ['OSXRunLoopSingleton.h'] -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary workaround to enable building with VS2015. - # media\webrtc\trunk\webrtc/base/criticalsection.h(59): warning C4312: - # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size - CXXFLAGS += ['-wd4312'] - EXPORTS.mozilla += ['ShmemPool.h',] EXPORTS.mozilla.media += ['CamerasTypes.h', diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build index 4f367c3709e1..5638f3734d5a 100644 --- a/dom/media/webrtc/moz.build +++ b/dom/media/webrtc/moz.build @@ -88,10 +88,3 @@ CXXFLAGS += [ DEFINES['TRACING'] = True FINAL_LIBRARY = 'xul' - -if CONFIG['CC_TYPE'] == 'clang-cl': - CXXFLAGS += [ - '-wd4275', # non dll-interface class used as base for dll-interface class - '-wd4312', # This is intended as a temporary hack to support building with VS2015 - # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size - ] diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build index d3de3e1fa0c2..619c40ab6ae3 100644 --- a/dom/plugins/ipc/moz.build +++ b/dom/plugins/ipc/moz.build @@ -147,11 +147,3 @@ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] - -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary hack to support building with VS2015. - # conversion from 'X' to 'Y' requires a narrowing conversion - CXXFLAGS += ['-wd4838'] - - # 'type cast': conversion from 'unsigned int' to 'HIMC' of greater size - CXXFLAGS += ['-wd4312'] diff --git a/dom/plugins/test/testplugin/testplugin.mozbuild b/dom/plugins/test/testplugin/testplugin.mozbuild index b5c0772df8e9..ef4dce1b4beb 100644 --- a/dom/plugins/test/testplugin/testplugin.mozbuild +++ b/dom/plugins/test/testplugin/testplugin.mozbuild @@ -55,11 +55,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3': OS_LIBS += CONFIG['XLIBS'] OS_LIBS += CONFIG['XEXT_LIBS'] -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary hack to support building with VS2015. - # conversion from 'X' to 'Y' requires a narrowing conversion - CXXFLAGS += ['-wd4838'] - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': FINAL_TARGET = 'dist/plugins/%s.plugin/Contents/MacOS' % cocoa_name OBJDIR_FILES.dist.plugins['%s.plugin' % cocoa_name].Contents += ['%s/Info.plist' % relative_path] diff --git a/gfx/vr/service/moz.build b/gfx/vr/service/moz.build index 7ee4e3aa6a91..61eab00279fc 100644 --- a/gfx/vr/service/moz.build +++ b/gfx/vr/service/moz.build @@ -38,9 +38,3 @@ if CONFIG['OS_TARGET'] in ('WINNT', 'Linux', 'Darwin'): ] FINAL_LIBRARY = 'xul' - -# This is intended as a temporary hack to enable VS2015 builds. -if CONFIG['CC_TYPE'] == 'clang-cl': - # ovr_capi_dynamic.h '': Alignment specifier is less than - # actual alignment (8), and will be ignored - CXXFLAGS += ['-wd4359'] diff --git a/ipc/glue/moz.build b/ipc/glue/moz.build index 08110bd05ab1..0726f3ec48aa 100644 --- a/ipc/glue/moz.build +++ b/ipc/glue/moz.build @@ -189,12 +189,6 @@ else: 'GeckoChildProcessHost.cpp', ] -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary hack to support building with VS2015. - # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size - SOURCES['BackgroundChildImpl.cpp'].flags += ['-wd4312'] - SOURCES['BackgroundParentImpl.cpp'].flags += ['-wd4312'] - LOCAL_INCLUDES += [ '/caps', '/dom/broadcastchannel', diff --git a/js/src/js-cxxflags.mozbuild b/js/src/js-cxxflags.mozbuild index 96b294a972ba..f12848d7a4ab 100644 --- a/js/src/js-cxxflags.mozbuild +++ b/js/src/js-cxxflags.mozbuild @@ -7,22 +7,6 @@ # ICU pkg-config flags CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] -if CONFIG['CC_TYPE'] == 'clang-cl': - # C4805 warns mixing bool with other integral types in computation. - # But given the conversion from bool is specified, and this is a - # pattern widely used in code in js/src, suppress this warning here. - CXXFLAGS += ['-wd4805'] - # C4661 ("no suitable definition provided for explicit template - # instantiation request") is emitted for all Parser methods that - # have a Parser definition but no - # Parser definition, see bug 1167030. - CXXFLAGS += ['-wd4661'] - # FIXME: unary minus operator applied to unsigned type (bug 1229189) - CXXFLAGS += ['-wd4146'] - # FIXME: 'operation' : conversion from 'type1' to 'type2' of - # greater size (bug 1259304) - CXXFLAGS += ['-wd4312'] - if CONFIG['CC_TYPE'] in ('clang', 'gcc'): # Also disable strict-aliasing for GCC compiler, that is enabled by default # starting with version 7.1, see Bug 1363009 diff --git a/js/src/old-configure.in b/js/src/old-configure.in index 6720d520da41..408160fd51ec 100644 --- a/js/src/old-configure.in +++ b/js/src/old-configure.in @@ -134,15 +134,9 @@ case "$target" in if test -z "$CLANG_CL"; then CPPFLAGS="$CPPFLAGS -utf-8" fi - # MSVC warning C4800 warns when a value is implicitly cast to bool, - # because this also forces narrowing to a single byte, which can be a - # perf hit. But this matters so little in practice (and often we want - # that behavior) that it's better to turn it off. # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific # secure CRT functions. - # MSVC warning C4595 warns non-member operator new or delete functions - # may not be declared inline, as of VS2015 Update 2. - CXXFLAGS="$CXXFLAGS -wd4800 -wd4595 -D_CRT_SECURE_NO_WARNINGS" + CXXFLAGS="$CXXFLAGS -D_CRT_SECURE_NO_WARNINGS" AC_LANG_SAVE AC_LANG_C AC_TRY_COMPILE([#include ], @@ -163,24 +157,10 @@ case "$target" in AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS) AC_DEFINE(_USE_MATH_DEFINES) # Otherwise MSVC's math.h doesn't #define M_PI. - # C5038: Enable initializer list order warnings - # The -w1#### flag treats warning C#### as if it was a warning level - # 1 warning, and thus enables it because we enable /W3 warnings. We - # don't use -we#### because it would enable warning C#### but treat - # it as an error, even in third-party code. - # https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level - CXXFLAGS="$CXXFLAGS -w15038" - _CC_SUITE=14 MSVC_C_RUNTIME_DLL=vcruntime140.dll MSVC_CXX_RUNTIME_DLL=msvcp140.dll - # C5026: move constructor was implicitly defined as deleted - CXXFLAGS="$CXXFLAGS -wd5026" - - # C5027: move assignment operator was implicitly defined as deleted - CXXFLAGS="$CXXFLAGS -wd5027" - # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146) CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-" @@ -624,19 +604,6 @@ case "$target" in # String tail merging doesn't play nice with ASan's ODR checker. LDFLAGS="$LDFLAGS -opt:nolldtailmerge" fi - # khuey says we can safely ignore MSVC warning C4251 - # MSVC warning C4244 (implicit type conversion may lose data) warns - # and requires workarounds for perfectly valid code. Also, GCC/clang - # don't warn about it by default. So for consistency/sanity, we turn - # it off on MSVC, too. - # MSVC warning C4267 warns for narrowing type conversions from size_t - # to 32-bit integer types on 64-bit platforms. Since this is virtually - # the same thing as C4244, we disable C4267, too. - CFLAGS="$CFLAGS -wd4244 -wd4267" - CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251" - # Silence "warning C4065: switch statement contains 'default' but no - # 'case' labels". See bug 1461304. - CXXFLAGS="$CXXFLAGS -wd4065" if test -n "$CLANG_CL"; then # XXX We should combine some of these with our generic GCC-style # warning checks. @@ -702,9 +669,6 @@ case "$target" in # is annoying, and rather noisy. CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused" fi - # make 'foo == bar;' error out - CFLAGS="$CFLAGS -we4553" - CXXFLAGS="$CXXFLAGS -we4553" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" MOZ_DEBUG_LDFLAGS='-DEBUG' WARNINGS_AS_ERRORS='-WX' diff --git a/js/xpconnect/wrappers/moz.build b/js/xpconnect/wrappers/moz.build index 6f67efc555a4..65474d5adc5c 100644 --- a/js/xpconnect/wrappers/moz.build +++ b/js/xpconnect/wrappers/moz.build @@ -21,12 +21,6 @@ SOURCES += [ 'XrayWrapper.cpp', ] -# warning C4661 for FilteringWrapper -if CONFIG['CC_TYPE'] == 'clang-cl': - CXXFLAGS += [ - '-wd4661', # no suitable definition provided for explicit template instantiation request - ] - include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' diff --git a/layout/base/moz.build b/layout/base/moz.build index 73ac55440b57..82a7e037d933 100644 --- a/layout/base/moz.build +++ b/layout/base/moz.build @@ -165,10 +165,5 @@ MARIONETTE_LAYOUT_MANIFESTS += ['tests/marionette/manifest.ini'] MOCHITEST_MANIFESTS += ['tests/mochitest.ini'] MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini'] -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary hack to support building with VS2015. - # 'type cast': conversion from 'unsigned int' to 'void *' of greater size - CXXFLAGS += ['-wd4312'] - if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] diff --git a/layout/painting/moz.build b/layout/painting/moz.build index a804d258c444..9fba3179e9f4 100644 --- a/layout/painting/moz.build +++ b/layout/painting/moz.build @@ -68,10 +68,5 @@ FINAL_LIBRARY = 'xul' CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary hack to support building with VS2015. - # 'type cast': conversion from 'unsigned int' to 'void *' of greater size - CXXFLAGS += ['-wd4312'] - if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] diff --git a/media/webrtc/signaling/gtest/moz.build b/media/webrtc/signaling/gtest/moz.build index d21b9f892e20..32aeaf4c235e 100644 --- a/media/webrtc/signaling/gtest/moz.build +++ b/media/webrtc/signaling/gtest/moz.build @@ -41,12 +41,3 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uikit' and CONFIG['OS_TARGET'] != 'Android': ] FINAL_LIBRARY = 'xul-gtest' - -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary workaround to enable warning free building - # with VS2015. - # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size - CXXFLAGS += ['-wd4312'] - - # Disable warning for decorated name length exceeded, name was truncated - CXXFLAGS += ['-wd4503'] diff --git a/media/webrtc/trunk/gtest/moz.build b/media/webrtc/trunk/gtest/moz.build index fc486a0275b2..d93545cb0145 100644 --- a/media/webrtc/trunk/gtest/moz.build +++ b/media/webrtc/trunk/gtest/moz.build @@ -481,10 +481,4 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Linux', 'WINNT']: if CONFIG['CC_TYPE'] == 'clang': CXXFLAGS += ['-Wno-comma'] - if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary workaround to enable warning free building - # with VS2015. - # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size - CXXFLAGS += ['-wd4312'] - GeckoProgram('webrtc-gtest', linkage=None) diff --git a/memory/build/moz.build b/memory/build/moz.build index ae4426e9027a..89ffa37de827 100644 --- a/memory/build/moz.build +++ b/memory/build/moz.build @@ -46,9 +46,6 @@ if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang': if CONFIG['MOZ_BUILD_APP'] != 'memory': FINAL_LIBRARY = 'mozglue' -if CONFIG['CC_TYPE'] == 'clang-cl': - CXXFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163) - if CONFIG['MOZ_REPLACE_MALLOC_STATIC']: DEFINES['MOZ_REPLACE_MALLOC_STATIC'] = True diff --git a/old-configure.in b/old-configure.in index 7cbf7cc9b62c..aea472a6d0ba 100644 --- a/old-configure.in +++ b/old-configure.in @@ -168,34 +168,9 @@ case "$target" in MSVC_C_RUNTIME_DLL=vcruntime140.dll MSVC_CXX_RUNTIME_DLL=msvcp140.dll - # C5038: Enable initializer list order warnings - # The -w1#### flag treats warning C#### as if it was a warning level - # 1 warning, and thus enables it because we enable /W3 warnings. We - # don't use -we#### because it would enable warning C#### but treat - # it as an error, even in third-party code. - # https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level - CXXFLAGS="$CXXFLAGS -w15038" - - # C5026: move constructor was implicitly defined as deleted - CXXFLAGS="$CXXFLAGS -wd5026" - - # C5027: move assignment operator was implicitly defined as deleted - CXXFLAGS="$CXXFLAGS -wd5027" - # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146) CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-" - # 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}]) @@ -767,25 +742,6 @@ case "$target" in # String tail merging doesn't play nice with ASan's ODR checker. LDFLAGS="$LDFLAGS -opt:nolldtailmerge" fi - # khuey says we can safely ignore MSVC warning C4251 - # MSVC warning C4244 (implicit type conversion may lose data) warns - # and requires workarounds for perfectly valid code. Also, GCC/clang - # don't warn about it by default. So for consistency/sanity, we turn - # it off on MSVC, too. - # MSVC warning C4267 warns for narrowing type conversions from size_t - # to 32-bit integer types on 64-bit platforms. Since this is virtually - # the same thing as C4244, we disable C4267, too. - # MSVC warning C4800 warns when a value is implicitly cast to bool, - # because this also forces narrowing to a single byte, which can be a - # perf hit. But this matters so little in practice (and often we want - # that behavior) that it's better to turn it off. - # MSVC warning C4595 warns non-member operator new or delete functions - # may not be declared inline, as of VS2015 Update 2. - CFLAGS="$CFLAGS -wd4244 -wd4267" - CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4800 -wd4595" - # Silence "warning C4065: switch statement contains 'default' but no - # 'case' labels". See bug 1461304. - CXXFLAGS="$CXXFLAGS -wd4065" if test -n "$CLANG_CL"; then # XXX We should combine some of these with our generic GCC-style # warning checks. @@ -851,9 +807,6 @@ case "$target" in # is annoying, and rather noisy. CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused" fi - # make 'foo == bar;' error out - CFLAGS="$CFLAGS -we4553" - CXXFLAGS="$CXXFLAGS -we4553" # Silence VS2017 15.5+ TR1 deprecation warnings hit by older gtest versions CXXFLAGS="$CXXFLAGS -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib" diff --git a/security/sandbox/moz.build b/security/sandbox/moz.build index f80e0bb35c52..4f90403966a6 100755 --- a/security/sandbox/moz.build +++ b/security/sandbox/moz.build @@ -172,10 +172,5 @@ elif CONFIG['OS_ARCH'] == 'WINNT': # Suppress warnings in third-party code. if CONFIG['CC_TYPE'] == 'clang-cl': CXXFLAGS += [ - '-wd4275', # non dll-interface class exception used as base for dll-interface class - '-wd4717', # recursive on all control paths, function will cause runtime stack overflow '-Wno-deprecated-declarations', # 'GetVersionExW': was declared deprecated - '-wd4302', # 'reinterpret_cast': truncation from 'LPCSTR' to 'WORD' - '-wd4311', # 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD' - '-wd4312', # 'reinterpret_cast': conversion from 'DWORD' to 'LPOVERLAPPED' of greater size ] diff --git a/toolkit/components/protobuf/moz.build b/toolkit/components/protobuf/moz.build index 1268182a1ec9..2469128af584 100644 --- a/toolkit/components/protobuf/moz.build +++ b/toolkit/components/protobuf/moz.build @@ -140,10 +140,6 @@ elif CONFIG['CC_TYPE'] == 'clang-cl': CXXFLAGS += [ '-Wno-macro-redefined', # 'WIN32_LEAN_AND_MEAN' : macro redefinition '-Wno-sign-compare', - '-wd4065', # switch statement contains 'default' but no 'case' labels - '-wd4099', # mismatched class/struct tags - '-wd4305', # double to float truncation - '-wd4506', # no definition for inline function (protobuf issue #240) ] if CONFIG['OS_TARGET'] == 'WINNT': diff --git a/toolkit/crashreporter/crashreporter.mozbuild b/toolkit/crashreporter/crashreporter.mozbuild index 892d25038443..f11febd7ce3d 100644 --- a/toolkit/crashreporter/crashreporter.mozbuild +++ b/toolkit/crashreporter/crashreporter.mozbuild @@ -13,12 +13,6 @@ LOCAL_INCLUDES += [ if CONFIG['CC_TYPE'] == 'clang-cl': CXXFLAGS += [ '-Wno-macro-redefined', - '-wd4146', # negative unsigned - '-wd4334', # 32-bit shift to 64 bits - '-wd4804', # unsafe use of type 'bool' - ] - CFLAGS += [ - '-wd4312', # conversion to greater size ] elif CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += [ diff --git a/toolkit/crashreporter/test/moz.build b/toolkit/crashreporter/test/moz.build index a060850e5dea..85a6ebf992ff 100755 --- a/toolkit/crashreporter/test/moz.build +++ b/toolkit/crashreporter/test/moz.build @@ -55,7 +55,3 @@ TEST_HARNESS_FILES.xpcshell.toolkit.crashreporter.test.unit_ipc += ['CrashTestUt include('/toolkit/crashreporter/crashreporter.mozbuild') NO_PGO = True - -# Temporary workaround for an issue in upstream breakpad -if CONFIG['CC_TYPE'] == 'clang-cl': - CXXFLAGS += ['-wd4334'] diff --git a/widget/windows/moz.build b/widget/windows/moz.build index 0c2a7b408326..edb683ebd85d 100644 --- a/widget/windows/moz.build +++ b/widget/windows/moz.build @@ -161,7 +161,3 @@ if CONFIG['CC_TYPE'] == 'clang-cl': 'ToastNotification.cpp', 'ToastNotificationHandler.cpp', ] - # C5038: Suppress initializer list order warnings from wrl.h - SOURCES['ToastNotification.cpp'].flags += ['-wd5038'] - SOURCES['ToastNotificationHandler.cpp'].flags += ['-wd5038'] - SOURCES['WindowsUIUtils.cpp'].flags += ['-wd5038'] diff --git a/xpcom/io/moz.build b/xpcom/io/moz.build index 6db2034cebbf..ccf895cca501 100644 --- a/xpcom/io/moz.build +++ b/xpcom/io/moz.build @@ -150,9 +150,3 @@ LOCAL_INCLUDES += [ '!..', '../build', ] - -if CONFIG['CC_TYPE'] == 'clang-cl': - # This is intended as a temporary hack to support building with VS2015. - # '_snwprintf' : format string '%s' requires an argument of type 'wchar_t *', - # but variadic argument 3 has type 'char16ptr_t' - CXXFLAGS += ['-wd4477']