Bug 1476475 - Use -W4 for certverifier with clang-cl. r=froydnj
MozReview-Commit-ID: 9OVJ2CFO0Qb
--- a/security/certverifier/moz.build
+++ b/security/certverifier/moz.build
@@ -56,17 +56,24 @@ LOCAL_INCLUDES += [
DIRS += [
'../pkix',
]
TEST_DIRS += [
'tests/gtest',
]
-CXXFLAGS += ['-Wall']
+if CONFIG['CC_TYPE'] == 'clang-cl':
+ # -Wall on clang-cl maps to -Weverything, which turns on way too
+ # much, so we're using -W4 instead, which is mapped to clang's
+ # -Wall -Wextra.
+ CXXFLAGS += ['-W4']
+else:
+ CXXFLAGS += ['-Wall']
+
if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
# -Wall with Visual C++ enables too many problematic warnings
CXXFLAGS += [
'-wd4324', # structure was padded due to __declspec(align())
'-wd4355', # 'this' used in base member initializer list
'-wd4464', # relative include path contains '..'
'-wd4480', # nonstandard extension used: specifying underlying type for
# enum 'enum'