Bug 1298466 - avoid some spammy warnings for ICU when compiling with clang-cl; r?ted.mielczarek
We don't need to hear about ICU redefining macros we set up or about
include paths that are Microsoft-specific, but still resolve to where
they need to go.
MozReview-Commit-ID: D9lFiNCvkOh
--- a/config/external/icu/defs.mozbuild
+++ b/config/external/icu/defs.mozbuild
@@ -31,10 +31,22 @@ if CONFIG['MOZ_DEBUG']:
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-frtti']
elif CONFIG['OS_TARGET'] == 'WINNT':
CXXFLAGS += ['-GR']
DISABLE_STL_WRAPPING = True
ALLOW_COMPILER_WARNINGS = True
+# We allow compiler warnings, but we can at least cut down on spammy
+# warnings that get triggered for every file.
+if CONFIG['CLANG_CL']:
+ CFLAGS += [
+ '-Wno-macro-redefined',
+ '-Wno-microsoft-include',
+ ]
+ CXXFLAGS += [
+ '-Wno-macro-redefined',
+ '-Wno-microsoft-include',
+ ]
+
if CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_ANDROID_CXX_STL'] == 'mozstlport':
LOCAL_INCLUDES += ['/build/gabi++/include']