From 3b21b7868b6ec10f6fc85292df58723059f3f977 Mon Sep 17 00:00:00 2001 From: Masatoshi Kimura Date: Tue, 31 Jul 2018 22:10:07 +0900 Subject: [PATCH] Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj --HG-- extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3 --- accessible/base/moz.build | 3 +++ accessible/generic/moz.build | 3 +++ accessible/interfaces/ia2/moz.build | 3 +++ accessible/interfaces/msaa/moz.build | 3 +++ accessible/ipc/moz.build | 3 +++ accessible/ipc/win/handler/moz.build | 2 ++ accessible/ipc/win/moz.build | 3 +++ accessible/windows/msaa/moz.build | 3 +++ accessible/windows/sdn/moz.build | 3 +++ accessible/xpcom/moz.build | 3 +++ browser/app/winlauncher/moz.build | 3 +++ browser/app/winlauncher/test/moz.build | 3 +++ build/clang-plugin/tests/moz.build | 3 +++ build/win32/moz.build | 3 +++ dom/base/moz.build | 3 +++ dom/encoding/moz.build | 4 ++++ dom/indexedDB/moz.build | 4 ++++ dom/media/fake-cdm/moz.build | 3 +++ dom/media/gmp/moz.build | 3 +++ dom/media/gtest/moz.build | 3 +++ dom/media/webrtc/moz.build | 3 +++ dom/plugins/base/moz.build | 3 +++ dom/plugins/ipc/hangui/moz.build | 5 +++++ dom/plugins/ipc/moz.build | 3 +++ dom/plugins/test/testplugin/testplugin.mozbuild | 3 +++ dom/storage/moz.build | 3 +++ dom/url/moz.build | 3 +++ gfx/2d/moz.build | 2 ++ gfx/gl/moz.build | 3 +++ gfx/layers/moz.build | 3 +++ gfx/thebes/moz.build | 3 +++ gfx/vr/moz.build | 3 +++ gfx/webrender_bindings/moz.build | 3 +++ ipc/chromium/moz.build | 3 +++ ipc/contentproc/moz.build | 3 +++ ipc/mscom/moz.build | 3 +++ ipc/mscom/oop/moz.build | 3 +++ js/xpconnect/shell/moz.build | 3 +++ js/xpconnect/src/moz.build | 3 +++ layout/painting/moz.build | 3 +++ media/gmp-clearkey/0.1/moz.build | 3 +++ media/mtransport/common.build | 3 +++ media/mtransport/third_party/nICEr/nicer.gyp | 1 + media/mtransport/third_party/nrappkit/nrappkit.gyp | 1 + media/webrtc/signaling/gtest/moz.build | 3 +++ media/webrtc/signaling/src/media-conduit/moz.build | 3 +++ media/webrtc/signaling/src/mediapipeline/moz.build | 3 +++ media/webrtc/signaling/src/sdp/moz.build | 3 +++ memory/build/moz.build | 3 +++ memory/replace/dmd/moz.build | 3 +++ memory/replace/logalloc/moz.build | 3 +++ memory/replace/moz.build | 3 +++ mozglue/build/moz.build | 3 +++ mozglue/tests/gtest/InjectorDLL/moz.build | 3 +++ mozglue/tests/interceptor/moz.build | 3 +++ netwerk/base/moz.build | 3 +++ netwerk/cookie/moz.build | 3 +++ netwerk/protocol/http/moz.build | 3 +++ netwerk/wifi/moz.build | 3 +++ old-configure.in | 7 +------ security/certverifier/moz.build | 3 +++ security/manager/ssl/moz.build | 3 +++ security/pkix/test/gtest/moz.build | 3 +++ security/pkix/warnings.mozbuild | 2 ++ security/sandbox/moz.build | 3 +++ security/sandbox/win/src/sandboxbroker/moz.build | 3 +++ testing/tools/fileid/moz.build | 2 ++ testing/tools/minidumpwriter/moz.build | 3 +++ toolkit/components/build/moz.build | 3 +++ toolkit/components/extensions/moz.build | 3 +++ toolkit/components/jsoncpp/src/lib_json/moz.build | 3 +++ toolkit/components/maintenanceservice/moz.build | 3 +++ toolkit/components/osfile/moz.build | 4 ++++ toolkit/components/reputationservice/moz.build | 3 +++ toolkit/components/telemetry/pingsender/moz.build | 3 +++ toolkit/components/url-classifier/moz.build | 3 +++ toolkit/components/url-classifier/tests/gtest/moz.build | 3 +++ toolkit/crashreporter/client/moz.build | 3 +++ .../crashreporter/google-breakpad/src/processor/moz.build | 3 +++ toolkit/crashreporter/minidump-analyzer/moz.build | 3 +++ toolkit/crashreporter/moz.build | 3 +++ toolkit/crashreporter/test/moz.build | 3 +++ toolkit/mozapps/update/common/moz.build | 3 +++ toolkit/mozapps/update/updater/updater-common.build | 2 ++ toolkit/system/windowsDHCPClient/moz.build | 5 ++++- toolkit/system/windowsDHCPClient/tests/gtest/moz.build | 5 ++++- toolkit/xre/moz.build | 3 +++ toolkit/xre/test/win/moz.build | 3 +++ tools/profiler/moz.build | 3 +++ widget/windows/moz.build | 3 +++ xpcom/base/moz.build | 3 +++ xpcom/glue/objs.mozbuild | 3 +++ xpcom/io/moz.build | 3 +++ xpcom/threads/moz.build | 3 +++ xpcom/windbgdlg/moz.build | 3 +++ 95 files changed, 281 insertions(+), 8 deletions(-) diff --git a/accessible/base/moz.build b/accessible/base/moz.build index 0a86a98a3d29..9fe296fc8368 100644 --- a/accessible/base/moz.build +++ b/accessible/base/moz.build @@ -114,3 +114,6 @@ include('/ipc/chromium/chromium-config.mozbuild') if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/generic/moz.build b/accessible/generic/moz.build index a2a0090d0334..6a3783550e71 100644 --- a/accessible/generic/moz.build +++ b/accessible/generic/moz.build @@ -70,3 +70,6 @@ include('/ipc/chromium/chromium-config.mozbuild') if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/interfaces/ia2/moz.build b/accessible/interfaces/ia2/moz.build index da3d1d39b058..5ba924822d5e 100644 --- a/accessible/interfaces/ia2/moz.build +++ b/accessible/interfaces/ia2/moz.build @@ -98,3 +98,6 @@ if CONFIG['CC_TYPE'] == 'clang-cl': '-Wno-missing-braces', '-Wno-unused-const-variable', ] + +if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/interfaces/msaa/moz.build b/accessible/interfaces/msaa/moz.build index 14aabb852e2f..2eb59bff56ce 100644 --- a/accessible/interfaces/msaa/moz.build +++ b/accessible/interfaces/msaa/moz.build @@ -44,3 +44,6 @@ if CONFIG['CC_TYPE'] == 'clang-cl': '-Wno-missing-braces', '-Wno-unused-const-variable', ] + +if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/ipc/moz.build b/accessible/ipc/moz.build index 96d7de6b7cae..b47a25356a8b 100644 --- a/accessible/ipc/moz.build +++ b/accessible/ipc/moz.build @@ -62,3 +62,6 @@ FINAL_LIBRARY = 'xul' # Add libFuzzer configuration directives include('/tools/fuzzing/libfuzzer-config.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/ipc/win/handler/moz.build b/accessible/ipc/win/handler/moz.build index 0e2be334b871..fae401fef0b5 100644 --- a/accessible/ipc/win/handler/moz.build +++ b/accessible/ipc/win/handler/moz.build @@ -83,3 +83,5 @@ LIBRARY_DEFINES['_UNICODE'] = True LIBRARY_DEFINES['MOZ_NO_MOZALLOC'] = True DisableStlWrapping() +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/ipc/win/moz.build b/accessible/ipc/win/moz.build index 10e91842c5a8..aa37dce7f360 100644 --- a/accessible/ipc/win/moz.build +++ b/accessible/ipc/win/moz.build @@ -55,3 +55,6 @@ if CONFIG['ACCESSIBILITY']: include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/windows/msaa/moz.build b/accessible/windows/msaa/moz.build index 499df9db21a5..34cf22bbd9d8 100644 --- a/accessible/windows/msaa/moz.build +++ b/accessible/windows/msaa/moz.build @@ -84,3 +84,6 @@ if CONFIG['CC_TYPE'] == 'clang-cl': include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/windows/sdn/moz.build b/accessible/windows/sdn/moz.build index ae0d5e20dcb0..c879e320e6f1 100644 --- a/accessible/windows/sdn/moz.build +++ b/accessible/windows/sdn/moz.build @@ -22,3 +22,6 @@ LOCAL_INCLUDES += [ include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/accessible/xpcom/moz.build b/accessible/xpcom/moz.build index 7bd432003dd6..aa7a2b55a95e 100644 --- a/accessible/xpcom/moz.build +++ b/accessible/xpcom/moz.build @@ -64,3 +64,6 @@ include('/ipc/chromium/chromium-config.mozbuild') if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/browser/app/winlauncher/moz.build b/browser/app/winlauncher/moz.build index c286b3120c8d..c260588cb4e9 100644 --- a/browser/app/winlauncher/moz.build +++ b/browser/app/winlauncher/moz.build @@ -25,3 +25,6 @@ TEST_DIRS += [ ] DisableStlWrapping() + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/browser/app/winlauncher/test/moz.build b/browser/app/winlauncher/test/moz.build index 31fbe296eeb2..2208aa5e3c06 100644 --- a/browser/app/winlauncher/test/moz.build +++ b/browser/app/winlauncher/test/moz.build @@ -15,3 +15,6 @@ LOCAL_INCLUDES += [ OS_LIBS += [ 'ntdll', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/build/clang-plugin/tests/moz.build b/build/clang-plugin/tests/moz.build index 873b8f15cce0..2d76d22498e2 100644 --- a/build/clang-plugin/tests/moz.build +++ b/build/clang-plugin/tests/moz.build @@ -66,3 +66,6 @@ COMPILE_FLAGS['OS_CFLAGS'] = ( ['-fsyntax-only', '-Xclang', '-verify', '-ferror-limit=0', '-std=c11', '-Wno-invalid-noreturn'] ) + +if CONFIG['ENABLE_CLANG_PLUGIN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/build/win32/moz.build b/build/win32/moz.build index 1f0fc2a5e55a..21df3e5c0ed6 100644 --- a/build/win32/moz.build +++ b/build/win32/moz.build @@ -32,3 +32,6 @@ if CONFIG['LLVM_SYMBOLIZER'] and CONFIG['WIN_DIA_SDK_BIN_DIR']: FINAL_TARGET_FILES += [ '%%%s/msdia140.dll' % CONFIG['WIN_DIA_SDK_BIN_DIR'] ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/base/moz.build b/dom/base/moz.build index aadffb390984..c7e93499e22e 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -510,3 +510,6 @@ counterlist.inputs = ['UseCounters.conf'] if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/encoding/moz.build b/dom/encoding/moz.build index 63be7903e736..537b00b32e1b 100644 --- a/dom/encoding/moz.build +++ b/dom/encoding/moz.build @@ -51,3 +51,7 @@ MOCHITEST_MANIFESTS += [ ] MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini'] XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] + +if (not CONFIG['HAVE_64BIT_BUILD'] and + CONFIG['ENABLE_CLANG_PLUGIN'] and CONFIG['CC_TYPE'] == 'clang-cl'): + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/indexedDB/moz.build b/dom/indexedDB/moz.build index 4549066510f2..9e5676e1de50 100644 --- a/dom/indexedDB/moz.build +++ b/dom/indexedDB/moz.build @@ -115,3 +115,7 @@ XPIDL_SOURCES += [ ] XPIDL_MODULE = 'dom_indexeddb' + +if (not CONFIG['HAVE_64BIT_BUILD'] and + CONFIG['ENABLE_CLANG_PLUGIN'] and CONFIG['CC_TYPE'] == 'clang-cl'): + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/media/fake-cdm/moz.build b/dom/media/fake-cdm/moz.build index ef54e912958f..76c56758312d 100644 --- a/dom/media/fake-cdm/moz.build +++ b/dom/media/fake-cdm/moz.build @@ -30,3 +30,6 @@ NoVisibilityFlags() # Don't use STL wrappers; this isn't Gecko code DisableStlWrapping() NO_PGO = True + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/media/gmp/moz.build b/dom/media/gmp/moz.build index 7e52adde7b54..ca0f56db0901 100644 --- a/dom/media/gmp/moz.build +++ b/dom/media/gmp/moz.build @@ -148,3 +148,6 @@ LOCAL_INCLUDES += [ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/media/gtest/moz.build b/dom/media/gtest/moz.build index 781ffa519eb7..7764a080ee62 100644 --- a/dom/media/gtest/moz.build +++ b/dom/media/gtest/moz.build @@ -88,3 +88,6 @@ FINAL_LIBRARY = 'xul-gtest' if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow', '-Wno-unused-private-field'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build index 75e4625ba8b4..71fd92f2eba6 100644 --- a/dom/media/webrtc/moz.build +++ b/dom/media/webrtc/moz.build @@ -88,3 +88,6 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size ] DEFINES['__PRETTY_FUNCTION__'] = '__FUNCSIG__' + +if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1306642 diff --git a/dom/plugins/base/moz.build b/dom/plugins/base/moz.build index 7f6161d80a51..57027479efee 100644 --- a/dom/plugins/base/moz.build +++ b/dom/plugins/base/moz.build @@ -92,3 +92,6 @@ CXXFLAGS += CONFIG['TK_CFLAGS'] if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/plugins/ipc/hangui/moz.build b/dom/plugins/ipc/hangui/moz.build index 213ead658e7a..bf6583ea3c44 100644 --- a/dom/plugins/ipc/hangui/moz.build +++ b/dom/plugins/ipc/hangui/moz.build @@ -25,3 +25,8 @@ RCINCLUDE = 'HangUIDlg.rc' OS_LIBS += [ 'comctl32', ] + +if ((CONFIG['MOZ_PGO'] or + (not CONFIG['HAVE_64BIT_BUILD'] and CONFIG['ENABLE_CLANG_PLUGIN'])) + and CONFIG['CC_TYPE'] == 'clang-cl'): + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build index 52b2e00e65da..14ffb1da521c 100644 --- a/dom/plugins/ipc/moz.build +++ b/dom/plugins/ipc/moz.build @@ -155,3 +155,6 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): # 'type cast': conversion from 'unsigned int' to 'HIMC' of greater size CXXFLAGS += ['-wd4312'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/plugins/test/testplugin/testplugin.mozbuild b/dom/plugins/test/testplugin/testplugin.mozbuild index cf25ade37042..ef87fb6eb34a 100644 --- a/dom/plugins/test/testplugin/testplugin.mozbuild +++ b/dom/plugins/test/testplugin/testplugin.mozbuild @@ -68,3 +68,6 @@ else: if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/storage/moz.build b/dom/storage/moz.build index 4003e44ff18c..b47f270adab8 100644 --- a/dom/storage/moz.build +++ b/dom/storage/moz.build @@ -49,3 +49,6 @@ LOCAL_INCLUDES += [ if CONFIG['ENABLE_TESTS']: DEFINES['DOM_STORAGE_TESTS'] = True + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/dom/url/moz.build b/dom/url/moz.build index 2c8545912907..45d33a449295 100644 --- a/dom/url/moz.build +++ b/dom/url/moz.build @@ -30,3 +30,6 @@ BROWSER_CHROME_MANIFESTS += [ 'tests/browser.ini' ] include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/gfx/2d/moz.build b/gfx/2d/moz.build index dfce6c7ba3e0..82456aba2b81 100644 --- a/gfx/2d/moz.build +++ b/gfx/2d/moz.build @@ -255,3 +255,5 @@ if CONFIG['MOZ_ENABLE_SKIA_GPU']: '/gfx/skia/skia/src/gpu', ] +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build index b54f52c84c29..76799bb29f1a 100644 --- a/gfx/gl/moz.build +++ b/gfx/gl/moz.build @@ -166,3 +166,6 @@ LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES'] if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index 8d9acc5b8cd7..f0ebc6fa2dea 100755 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -583,3 +583,6 @@ if CONFIG['MOZ_ENABLE_SKIA']: UNIFIED_SOURCES += [ 'composite/PaintCounter.cpp', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index e29c26fd7dc6..0fcbfb78ea2a 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -293,3 +293,6 @@ DEFINES['GRAPHITE2_STATIC'] = True if CONFIG['CC_TYPE'] == 'clang': # Suppress warnings from Skia header files. SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/gfx/vr/moz.build b/gfx/vr/moz.build index c9abde79a3f3..d66f9e2e91ea 100644 --- a/gfx/vr/moz.build +++ b/gfx/vr/moz.build @@ -97,3 +97,6 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): # ovr_capi_dynamic.h '': Alignment specifier is less than # actual alignment (8), and will be ignored CXXFLAGS += ['-wd4359'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/gfx/webrender_bindings/moz.build b/gfx/webrender_bindings/moz.build index f2d34cd1fe3c..45439d62d38f 100644 --- a/gfx/webrender_bindings/moz.build +++ b/gfx/webrender_bindings/moz.build @@ -66,3 +66,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'): include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/ipc/chromium/moz.build b/ipc/chromium/moz.build index 315f30bae5f7..193685738b32 100644 --- a/ipc/chromium/moz.build +++ b/ipc/chromium/moz.build @@ -152,3 +152,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): # Add libFuzzer configuration directives include('/tools/fuzzing/libfuzzer-config.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/ipc/contentproc/moz.build b/ipc/contentproc/moz.build index 07cf0b97c676..10e80926af53 100644 --- a/ipc/contentproc/moz.build +++ b/ipc/contentproc/moz.build @@ -23,3 +23,6 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT': '/security/sandbox/chromium', '/security/sandbox/chromium-shim', ] + +if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/ipc/mscom/moz.build b/ipc/mscom/moz.build index 1158e8c53666..5f425ceb806b 100644 --- a/ipc/mscom/moz.build +++ b/ipc/mscom/moz.build @@ -86,3 +86,6 @@ FINAL_LIBRARY = 'xul' with Files("**"): BUG_COMPONENT = ("Core", "IPC: MSCOM") + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/ipc/mscom/oop/moz.build b/ipc/mscom/oop/moz.build index 8be7842b6e07..b2968575e32f 100644 --- a/ipc/mscom/oop/moz.build +++ b/ipc/mscom/oop/moz.build @@ -37,3 +37,6 @@ FORCE_STATIC_LIB = True # This DLL may be loaded into other processes, so we need static libs for # Windows 7 and Windows 8. USE_STATIC_LIBS = True + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/js/xpconnect/shell/moz.build b/js/xpconnect/shell/moz.build index c9f1137bdab5..16d68399e6ca 100644 --- a/js/xpconnect/shell/moz.build +++ b/js/xpconnect/shell/moz.build @@ -53,3 +53,6 @@ if CONFIG['OS_ARCH'] == 'WINNT': CFLAGS += CONFIG['TK_CFLAGS'] CXXFLAGS += CONFIG['TK_CFLAGS'] OS_LIBS += CONFIG['TK_LIBS'] + +if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/js/xpconnect/src/moz.build b/js/xpconnect/src/moz.build index 7a03e1944400..f4b2bec0fea1 100644 --- a/js/xpconnect/src/moz.build +++ b/js/xpconnect/src/moz.build @@ -64,3 +64,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG['NIGHTLY_BUILD']: DEFINES['ENABLE_WASM_GC'] = True + +if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/layout/painting/moz.build b/layout/painting/moz.build index d3822336c572..c832f5c1a050 100644 --- a/layout/painting/moz.build +++ b/layout/painting/moz.build @@ -75,3 +75,6 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/media/gmp-clearkey/0.1/moz.build b/media/gmp-clearkey/0.1/moz.build index 5ec857652384..9b18b4dd1c6f 100644 --- a/media/gmp-clearkey/0.1/moz.build +++ b/media/gmp-clearkey/0.1/moz.build @@ -78,3 +78,6 @@ elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): CFLAGS += [ '-FI', 'stdio.h', # for sprintf() prototype ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/media/mtransport/common.build b/media/mtransport/common.build index fe7ea2c359c3..dfd8d165665b 100644 --- a/media/mtransport/common.build +++ b/media/mtransport/common.build @@ -93,3 +93,6 @@ DEFINES['R_DEFINED_UINT8'] = 'uint64_t' if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/media/mtransport/third_party/nICEr/nicer.gyp b/media/mtransport/third_party/nICEr/nicer.gyp index 4827eb5b7485..cb383fe9a98f 100644 --- a/media/mtransport/third_party/nICEr/nicer.gyp +++ b/media/mtransport/third_party/nICEr/nicer.gyp @@ -207,6 +207,7 @@ # Windows, clang-cl build [ 'clang_cl == 1', { 'cflags_mozilla': [ + '-Wno-error', # workaround for bug 1090497 '-Xclang', '-Wall', '-Wno-parentheses', diff --git a/media/mtransport/third_party/nrappkit/nrappkit.gyp b/media/mtransport/third_party/nrappkit/nrappkit.gyp index 4c45da8dd6b2..4a8472eff6d6 100644 --- a/media/mtransport/third_party/nrappkit/nrappkit.gyp +++ b/media/mtransport/third_party/nrappkit/nrappkit.gyp @@ -204,6 +204,7 @@ # Windows, clang-cl build [ 'clang_cl == 1', { 'cflags_mozilla': [ + '-Wno-error', # workaround for bug 1090497 '-Xclang', '-Wall', '-Wno-parentheses', diff --git a/media/webrtc/signaling/gtest/moz.build b/media/webrtc/signaling/gtest/moz.build index 85316c6b6473..6a4bd44eea81 100644 --- a/media/webrtc/signaling/gtest/moz.build +++ b/media/webrtc/signaling/gtest/moz.build @@ -48,3 +48,6 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): # Disable warning for decorated name length exceeded, name was truncated CXXFLAGS += ['-wd4503'] + +if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1306642 diff --git a/media/webrtc/signaling/src/media-conduit/moz.build b/media/webrtc/signaling/src/media-conduit/moz.build index ef663638b2d9..0ee45385f806 100644 --- a/media/webrtc/signaling/src/media-conduit/moz.build +++ b/media/webrtc/signaling/src/media-conduit/moz.build @@ -35,3 +35,6 @@ if CONFIG['OS_TARGET'] == 'Android': ] FINAL_LIBRARY = 'xul' + +if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1306642 diff --git a/media/webrtc/signaling/src/mediapipeline/moz.build b/media/webrtc/signaling/src/mediapipeline/moz.build index b4c41d70a796..2a3c0b21e6ad 100644 --- a/media/webrtc/signaling/src/mediapipeline/moz.build +++ b/media/webrtc/signaling/src/mediapipeline/moz.build @@ -29,3 +29,6 @@ UNIFIED_SOURCES += [ DEFINES['TRACING'] = True FINAL_LIBRARY = 'xul' + +if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1306642 diff --git a/media/webrtc/signaling/src/sdp/moz.build b/media/webrtc/signaling/src/sdp/moz.build index 3c51a33d3f4f..0099d16f3f61 100644 --- a/media/webrtc/signaling/src/sdp/moz.build +++ b/media/webrtc/signaling/src/sdp/moz.build @@ -61,3 +61,6 @@ SOURCES += [ ] FINAL_LIBRARY = 'xul' + +if CONFIG['ENABLE_CLANG_PLUGIN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/memory/build/moz.build b/memory/build/moz.build index e2c715271001..84e3d6281607 100644 --- a/memory/build/moz.build +++ b/memory/build/moz.build @@ -53,3 +53,6 @@ if CONFIG['MOZ_REPLACE_MALLOC_STATIC']: DEFINES['MOZ_REPLACE_MALLOC_STATIC'] = True DisableStlWrapping() + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/memory/replace/dmd/moz.build b/memory/replace/dmd/moz.build index c6603df92a06..507ed84cbc7a 100644 --- a/memory/replace/dmd/moz.build +++ b/memory/replace/dmd/moz.build @@ -36,3 +36,6 @@ if CONFIG['OS_ARCH'] == 'WINNT': ] TEST_DIRS += ['test'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/memory/replace/logalloc/moz.build b/memory/replace/logalloc/moz.build index d6ec145559dc..70aa8cf8104c 100644 --- a/memory/replace/logalloc/moz.build +++ b/memory/replace/logalloc/moz.build @@ -28,3 +28,6 @@ if CONFIG['OS_TARGET'] == 'Android' and FORCE_SHARED_LIB: DIRS += [ 'replay', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/memory/replace/moz.build b/memory/replace/moz.build index 4858b3379015..49e6966eb537 100644 --- a/memory/replace/moz.build +++ b/memory/replace/moz.build @@ -18,3 +18,6 @@ DIRS += [ if CONFIG['MOZ_DMD']: DIRS += ['dmd'] + +if CONFIG['MOZ_DEBUG'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build index b3d9dfc387fe..674ab453800c 100644 --- a/mozglue/build/moz.build +++ b/mozglue/build/moz.build @@ -134,3 +134,6 @@ if CONFIG['MOZ_LINKER'] and CONFIG['CPU_ARCH'] == 'arm': LDFLAGS += ['-Wl,-version-script,%s/arm-eabi-filter' % SRCDIR] DIST_INSTALL = True + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/mozglue/tests/gtest/InjectorDLL/moz.build b/mozglue/tests/gtest/InjectorDLL/moz.build index 9f60e9443373..053221dd61b6 100644 --- a/mozglue/tests/gtest/InjectorDLL/moz.build +++ b/mozglue/tests/gtest/InjectorDLL/moz.build @@ -13,3 +13,6 @@ UNIFIED_SOURCES = [ if CONFIG['COMPILE_ENVIRONMENT']: TEST_HARNESS_FILES.gtest += ['!InjectorDLL.dll'] + +if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/mozglue/tests/interceptor/moz.build b/mozglue/tests/interceptor/moz.build index 9a69037d6d56..a0f205907263 100644 --- a/mozglue/tests/interceptor/moz.build +++ b/mozglue/tests/interceptor/moz.build @@ -21,3 +21,6 @@ if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] == 'gcc': LDFLAGS += [ '-municode', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/netwerk/base/moz.build b/netwerk/base/moz.build index 8919361fb07c..f15746302ea0 100644 --- a/netwerk/base/moz.build +++ b/netwerk/base/moz.build @@ -306,3 +306,6 @@ LOCAL_INCLUDES += [ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/netwerk/cookie/moz.build b/netwerk/cookie/moz.build index 96a406b14a83..e84cb3cb6a10 100644 --- a/netwerk/cookie/moz.build +++ b/netwerk/cookie/moz.build @@ -55,3 +55,6 @@ FINAL_LIBRARY = 'xul' if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-error=shadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build index cb1190cf9557..e02c78ff1f3a 100644 --- a/netwerk/protocol/http/moz.build +++ b/netwerk/protocol/http/moz.build @@ -143,3 +143,6 @@ if CONFIG['OS_TARGET'] == 'Darwin': DEFINES.update( HAS_CONNECTX=True, ) + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/netwerk/wifi/moz.build b/netwerk/wifi/moz.build index 7aef5e2e01f2..fcc85db476e9 100644 --- a/netwerk/wifi/moz.build +++ b/netwerk/wifi/moz.build @@ -54,3 +54,6 @@ if CONFIG['NECKO_WIFI_DBUS']: CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS'] FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/old-configure.in b/old-configure.in index 169b90fa20b2..26e837297cfd 100644 --- a/old-configure.in +++ b/old-configure.in @@ -1044,12 +1044,7 @@ case "$target" in CXXFLAGS="$CXXFLAGS -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib" MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' - # -Werror is disabled on clang-cl until bug 1090497 cleans up the noise. - if test -n "$CLANG_CL"; then - WARNINGS_AS_ERRORS='' - else - WARNINGS_AS_ERRORS='-WX' - fi + WARNINGS_AS_ERRORS='-WX' # Use a higher optimization level for clang-cl, so we can come closer # to MSVC's performance numbers (see bug 1443590). if test -n "$CLANG_CL"; then diff --git a/security/certverifier/moz.build b/security/certverifier/moz.build index d694e3c4ead6..fcb639aa35fa 100644 --- a/security/certverifier/moz.build +++ b/security/certverifier/moz.build @@ -144,3 +144,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): ] FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/security/manager/ssl/moz.build b/security/manager/ssl/moz.build index 3f08c8fd08c4..e642a504550d 100644 --- a/security/manager/ssl/moz.build +++ b/security/manager/ssl/moz.build @@ -219,3 +219,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += [ '-Wno-unused-parameter', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/security/pkix/test/gtest/moz.build b/security/pkix/test/gtest/moz.build index d9fa10e60da2..23edde55bdc9 100644 --- a/security/pkix/test/gtest/moz.build +++ b/security/pkix/test/gtest/moz.build @@ -70,3 +70,6 @@ elif CONFIG['CC_TYPE'] == 'msvc': # declaration of '*' hides class member '-wd4458', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/security/pkix/warnings.mozbuild b/security/pkix/warnings.mozbuild index f89d7fb74bed..182aa6773b57 100644 --- a/security/pkix/warnings.mozbuild +++ b/security/pkix/warnings.mozbuild @@ -10,6 +10,8 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-reserved-id-macro', # NSPR and NSS use reserved IDs in their include guards. '-Wno-weak-vtables', # We rely on the linker to merge the duplicate vtables. ] + if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 elif CONFIG['CC_TYPE'] == 'msvc': CXXFLAGS += [ '-sdl', # Enable additional security checks based on Microsoft's SDL. diff --git a/security/sandbox/moz.build b/security/sandbox/moz.build index bdc5e8492a50..db0449b11add 100755 --- a/security/sandbox/moz.build +++ b/security/sandbox/moz.build @@ -178,3 +178,6 @@ elif CONFIG['OS_ARCH'] == 'WINNT': '-wd4311', # 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD' '-wd4312', # 'reinterpret_cast': conversion from 'DWORD' to 'LPOVERLAPPED' of greater size ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/security/sandbox/win/src/sandboxbroker/moz.build b/security/sandbox/win/src/sandboxbroker/moz.build index cf97b038865b..f06bd3c6955c 100644 --- a/security/sandbox/win/src/sandboxbroker/moz.build +++ b/security/sandbox/win/src/sandboxbroker/moz.build @@ -19,3 +19,6 @@ LOCAL_INCLUDES += ['/security/sandbox/chromium-shim'] LOCAL_INCLUDES += ['/security/sandbox/chromium'] FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/testing/tools/fileid/moz.build b/testing/tools/fileid/moz.build index ce5e36888a52..75862b7d7bff 100644 --- a/testing/tools/fileid/moz.build +++ b/testing/tools/fileid/moz.build @@ -38,3 +38,5 @@ if CONFIG['OS_ARCH'] == 'Linux' or CONFIG['OS_ARCH'] == 'Darwin': '/toolkit/crashreporter/google-breakpad/src', ] +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/testing/tools/minidumpwriter/moz.build b/testing/tools/minidumpwriter/moz.build index 945856ef6de2..f32ca28ae821 100644 --- a/testing/tools/minidumpwriter/moz.build +++ b/testing/tools/minidumpwriter/moz.build @@ -17,3 +17,6 @@ if CONFIG['ENABLE_TESTS'] and CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['OS_ARCH WIN32_EXE_LDFLAGS += ['-municode'] NO_PGO = True + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/build/moz.build b/toolkit/components/build/moz.build index 67c5c73349dd..76a609253eb6 100644 --- a/toolkit/components/build/moz.build +++ b/toolkit/components/build/moz.build @@ -37,3 +37,6 @@ if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS']: LOCAL_INCLUDES += [ '../parentalcontrols', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/extensions/moz.build b/toolkit/components/extensions/moz.build index ccdfb4c206b7..d0418916a40d 100644 --- a/toolkit/components/extensions/moz.build +++ b/toolkit/components/extensions/moz.build @@ -98,3 +98,6 @@ with Files('docs/**'): SCHEDULES.exclusive = ['docs'] include('/ipc/chromium/chromium-config.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/jsoncpp/src/lib_json/moz.build b/toolkit/components/jsoncpp/src/lib_json/moz.build index 6920229e1ea1..e515c5680673 100644 --- a/toolkit/components/jsoncpp/src/lib_json/moz.build +++ b/toolkit/components/jsoncpp/src/lib_json/moz.build @@ -51,3 +51,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'): CXXFLAGS += [ '-Wno-implicit-fallthrough', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/maintenanceservice/moz.build b/toolkit/components/maintenanceservice/moz.build index ff6c6ad8d980..5b5b5f61b332 100644 --- a/toolkit/components/maintenanceservice/moz.build +++ b/toolkit/components/maintenanceservice/moz.build @@ -47,3 +47,6 @@ OS_LIBS += [ with Files('**'): BUG_COMPONENT = ('Toolkit', 'Application Update') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/osfile/moz.build b/toolkit/components/osfile/moz.build index a3367f0b61b4..47d5f7e11567 100644 --- a/toolkit/components/osfile/moz.build +++ b/toolkit/components/osfile/moz.build @@ -33,3 +33,7 @@ FINAL_LIBRARY = 'xul' with Files('**'): BUG_COMPONENT = ('Toolkit', 'OS.File') + +if (not CONFIG['HAVE_64BIT_BUILD'] and + CONFIG['ENABLE_CLANG_PLUGIN'] and CONFIG['CC_TYPE'] == 'clang-cl'): + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/reputationservice/moz.build b/toolkit/components/reputationservice/moz.build index dd90dafb4883..b8917ca19c82 100644 --- a/toolkit/components/reputationservice/moz.build +++ b/toolkit/components/reputationservice/moz.build @@ -42,3 +42,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): CXXFLAGS += ['-Wno-shadow'] include('/ipc/chromium/chromium-config.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/telemetry/pingsender/moz.build b/toolkit/components/telemetry/pingsender/moz.build index c4187d9e4831..32becbeed777 100644 --- a/toolkit/components/telemetry/pingsender/moz.build +++ b/toolkit/components/telemetry/pingsender/moz.build @@ -36,3 +36,6 @@ else: # Don't use the STL wrappers; we don't link with -lmozalloc, and it really # doesn't matter here anyway. DisableStlWrapping() + +if CONFIG['MOZ_DEBUG'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/url-classifier/moz.build b/toolkit/components/url-classifier/moz.build index 67bc4dc22792..ecb61bbbb395 100644 --- a/toolkit/components/url-classifier/moz.build +++ b/toolkit/components/url-classifier/moz.build @@ -98,3 +98,6 @@ with Files('docs/**'): SCHEDULES.exclusive = ['docs'] include('/ipc/chromium/chromium-config.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/components/url-classifier/tests/gtest/moz.build b/toolkit/components/url-classifier/tests/gtest/moz.build index 28a21b85e877..3aae469e082b 100644 --- a/toolkit/components/url-classifier/tests/gtest/moz.build +++ b/toolkit/components/url-classifier/tests/gtest/moz.build @@ -36,3 +36,6 @@ if CONFIG['NIGHTLY_BUILD'] or CONFIG['MOZ_DEBUG']: DEFINES['MOZ_SAFEBROWSING_DUMP_FAILED_UPDATES'] = True FINAL_LIBRARY = 'xul-gtest' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/crashreporter/client/moz.build b/toolkit/crashreporter/client/moz.build index 55f89ef4ff23..277502fac9f5 100644 --- a/toolkit/crashreporter/client/moz.build +++ b/toolkit/crashreporter/client/moz.build @@ -98,3 +98,6 @@ RCINCLUDE = 'crashreporter.rc' DisableStlWrapping() include('/toolkit/crashreporter/crashreporter.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/crashreporter/google-breakpad/src/processor/moz.build b/toolkit/crashreporter/google-breakpad/src/processor/moz.build index 9cc00f162d34..9e992f0b246e 100644 --- a/toolkit/crashreporter/google-breakpad/src/processor/moz.build +++ b/toolkit/crashreporter/google-breakpad/src/processor/moz.build @@ -61,3 +61,6 @@ Library('breakpad_processor') DisableStlWrapping() include('/toolkit/crashreporter/crashreporter.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/crashreporter/minidump-analyzer/moz.build b/toolkit/crashreporter/minidump-analyzer/moz.build index 70f3b259a9d8..3df941ee8493 100644 --- a/toolkit/crashreporter/minidump-analyzer/moz.build +++ b/toolkit/crashreporter/minidump-analyzer/moz.build @@ -59,3 +59,6 @@ if CONFIG['OS_TARGET'] != 'WINNT': DisableStlWrapping() include('/toolkit/crashreporter/crashreporter.mozbuild') + +if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/crashreporter/moz.build b/toolkit/crashreporter/moz.build index f726be233cc9..c5e8b111d323 100644 --- a/toolkit/crashreporter/moz.build +++ b/toolkit/crashreporter/moz.build @@ -128,3 +128,6 @@ else: with Files('**'): BUG_COMPONENT = ('Toolkit', 'Crash Reporting') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/crashreporter/test/moz.build b/toolkit/crashreporter/test/moz.build index bb66db995a20..23a19d5dd4ca 100755 --- a/toolkit/crashreporter/test/moz.build +++ b/toolkit/crashreporter/test/moz.build @@ -58,3 +58,6 @@ NO_PGO = True # Temporary workaround for an issue in upstream breakpad if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): CXXFLAGS += ['-wd4334'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 \ No newline at end of file diff --git a/toolkit/mozapps/update/common/moz.build b/toolkit/mozapps/update/common/moz.build index 9b382019cab4..197f19d43b9e 100644 --- a/toolkit/mozapps/update/common/moz.build +++ b/toolkit/mozapps/update/common/moz.build @@ -50,3 +50,6 @@ SOURCES += [ 'readstrings.cpp', 'updatecommon.cpp', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/mozapps/update/updater/updater-common.build b/toolkit/mozapps/update/updater/updater-common.build index c446f2b35a60..0d4f18d37838 100644 --- a/toolkit/mozapps/update/updater/updater-common.build +++ b/toolkit/mozapps/update/updater/updater-common.build @@ -114,3 +114,5 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: if CONFIG['CC_TYPE'] == 'gcc': CXXFLAGS += ['-Wno-format-truncation'] +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/system/windowsDHCPClient/moz.build b/toolkit/system/windowsDHCPClient/moz.build index 3124e393a89d..ab0d26565955 100644 --- a/toolkit/system/windowsDHCPClient/moz.build +++ b/toolkit/system/windowsDHCPClient/moz.build @@ -15,4 +15,7 @@ SOURCES += [ 'WindowsNetworkFunctionsWrapper.cpp' ] -FINAL_LIBRARY = 'xul' \ No newline at end of file +FINAL_LIBRARY = 'xul' + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/system/windowsDHCPClient/tests/gtest/moz.build b/toolkit/system/windowsDHCPClient/tests/gtest/moz.build index cb0e5f8ddd08..7ff910c8decb 100644 --- a/toolkit/system/windowsDHCPClient/tests/gtest/moz.build +++ b/toolkit/system/windowsDHCPClient/tests/gtest/moz.build @@ -18,4 +18,7 @@ LOCAL_INCLUDES += [ FINAL_LIBRARY = 'xul-gtest' if CONFIG['GNU_CXX']: - CXXFLAGS += ['-Wshadow'] \ No newline at end of file + CXXFLAGS += ['-Wshadow'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build index 65778b8841e3..dda6846d0489 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -234,3 +234,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG['MOZ_IPDL_TESTS']: DEFINES['MOZ_IPDL_TESTS'] = True + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/toolkit/xre/test/win/moz.build b/toolkit/xre/test/win/moz.build index 9a46eb3b1147..c18abfd81aeb 100644 --- a/toolkit/xre/test/win/moz.build +++ b/toolkit/xre/test/win/moz.build @@ -23,3 +23,6 @@ OS_LIBS += [ 'shell32', 'ws2_32', ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/tools/profiler/moz.build b/tools/profiler/moz.build index 53b69801a170..0752d81b4e6e 100644 --- a/tools/profiler/moz.build +++ b/tools/profiler/moz.build @@ -153,3 +153,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): with Files('**'): BUG_COMPONENT = ('Core', 'Gecko Profiler') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/widget/windows/moz.build b/widget/windows/moz.build index 762323302494..2089a6f256c4 100644 --- a/widget/windows/moz.build +++ b/widget/windows/moz.build @@ -166,3 +166,6 @@ OS_LIBS += [ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): # C5038: Suppress initializer list order warnings from wrl.h SOURCES['WindowsUIUtils.cpp'].flags += ['-wd5038'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/xpcom/base/moz.build b/xpcom/base/moz.build index f761ccee1cc5..c2dbba28fddc 100644 --- a/xpcom/base/moz.build +++ b/xpcom/base/moz.build @@ -217,3 +217,6 @@ LOCAL_INCLUDES += [ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: CXXFLAGS += CONFIG['TK_CFLAGS'] + +if CONFIG['ENABLE_CLANG_PLUGIN'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/xpcom/glue/objs.mozbuild b/xpcom/glue/objs.mozbuild index 3c4ea23614df..b55690438f9c 100644 --- a/xpcom/glue/objs.mozbuild +++ b/xpcom/glue/objs.mozbuild @@ -19,3 +19,6 @@ xpcom_gluens_src_lcppsrcs = [ xpcom_gluens_src_cppsrcs = [ '/xpcom/glue/%s' % s for s in xpcom_gluens_src_lcppsrcs ] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/xpcom/io/moz.build b/xpcom/io/moz.build index 5947a04eb494..4dd0def517e3 100644 --- a/xpcom/io/moz.build +++ b/xpcom/io/moz.build @@ -157,3 +157,6 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): # '_snwprintf' : format string '%s' requires an argument of type 'wchar_t *', # but variadic argument 3 has type 'char16ptr_t' CXXFLAGS += ['-wd4477'] + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/xpcom/threads/moz.build b/xpcom/threads/moz.build index 6743ce779c23..e57bf639458f 100644 --- a/xpcom/threads/moz.build +++ b/xpcom/threads/moz.build @@ -119,3 +119,6 @@ LOCAL_INCLUDES += [ FINAL_LIBRARY = 'xul' include('/ipc/chromium/chromium-config.mozbuild') + +if CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497 diff --git a/xpcom/windbgdlg/moz.build b/xpcom/windbgdlg/moz.build index f0343d31ae6f..a8442bc1fa28 100644 --- a/xpcom/windbgdlg/moz.build +++ b/xpcom/windbgdlg/moz.build @@ -7,3 +7,6 @@ SimplePrograms([ 'windbgdlg' ]) + +if CONFIG['MOZ_DEBUG'] and CONFIG['CC_TYPE'] == 'clang-cl': + AllowCompilerWarnings() # workaround for bug 1090497