Bug 1476948 - Suppress clang-cl warnings from the MIDL generated code in accessible/. r?Build
MozReview-Commit-ID: KttvrkWWRPB
--- a/accessible/interfaces/gecko/moz.build
+++ b/accessible/interfaces/gecko/moz.build
@@ -15,15 +15,16 @@ GENERATED_FILES += [
'IGeckoCustom.h',
'IGeckoCustom.tlb',
'IGeckoCustom_i.c',
'IGeckoCustom_p.c',
]
FINAL_LIBRARY = 'xul'
-# The Windows MIDL code generator creates things like:
-#
-# #endif !_MIDL_USE_GUIDDEF_
-#
-# which clang-cl complains about. MSVC doesn't, so turn this warning off.
+# Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl':
- CFLAGS += ['-Wno-extra-tokens']
+ CFLAGS += [
+ '-Wno-extern-initializer',
+ '-Wno-incompatible-pointer-types',
+ '-Wno-missing-braces',
+ '-Wno-unused-const-variable',
+ ]
--- a/accessible/interfaces/ia2/moz.build
+++ b/accessible/interfaces/ia2/moz.build
@@ -85,15 +85,16 @@ GENERATED_FILES += [
]
SOURCES += [
'!%s' % p for p in GENERATED_FILES if p.endswith('.c')
]
RCINCLUDE = 'IA2Marshal.rc'
-# The Windows MIDL code generator creates things like:
-#
-# #endif !_MIDL_USE_GUIDDEF_
-#
-# which clang-cl complains about. MSVC doesn't, so turn this warning off.
+# Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl':
- CXXFLAGS += ['-Wno-extra-tokens']
+ CFLAGS += [
+ '-Wno-extern-initializer',
+ '-Wno-incompatible-pointer-types',
+ '-Wno-missing-braces',
+ '-Wno-unused-const-variable',
+ ]
--- a/accessible/interfaces/msaa/moz.build
+++ b/accessible/interfaces/msaa/moz.build
@@ -31,15 +31,16 @@ GENERATED_FILES += [
'ISimpleDOM.h',
'ISimpleDOM.tlb',
'ISimpleDOM_i.c',
'ISimpleDOM_p.c',
]
RCINCLUDE = 'AccessibleMarshal.rc'
-# The Windows MIDL code generator creates things like:
-#
-# #endif !_MIDL_USE_GUIDDEF_
-#
-# which clang-cl complains about. MSVC doesn't, so turn this warning off.
+# Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl':
- CFLAGS += ['-Wno-extra-tokens']
+ CFLAGS += [
+ '-Wno-extern-initializer',
+ '-Wno-incompatible-pointer-types',
+ '-Wno-missing-braces',
+ '-Wno-unused-const-variable',
+ ]
--- a/accessible/ipc/win/handler/moz.build
+++ b/accessible/ipc/win/handler/moz.build
@@ -44,16 +44,25 @@ USE_LIBS += [
]
OS_LIBS += [
'rpcrt4',
]
RCINCLUDE = 'AccessibleHandler.rc'
+# Suppress warnings from the MIDL generated code.
+if CONFIG['CC_TYPE'] == 'clang-cl':
+ CFLAGS += [
+ '-Wno-extern-initializer',
+ '-Wno-incompatible-pointer-types',
+ '-Wno-missing-braces',
+ '-Wno-unused-const-variable',
+ ]
+
# Since we are defining our own COM entry points (DllRegisterServer et al),
# but we still want to be able to delegate some work to the generated code,
# we add the prefix "Proxy" to all of the generated counterparts.
DEFINES['ENTRY_PREFIX'] = 'Proxy'
DEFINES['REGISTER_PROXY_DLL'] = True
LIBRARY_DEFINES['MOZ_MSCOM_REMARSHAL_NO_HANDLER'] = True
# We want to generate distinct UUIDs on a per-channel basis, so we need