Bug 1476475 - Use -W4 for certverifier with clang-cl. r=froydnj draft
authorXidorn Quan <me@upsuper.org>
Fri, 20 Jul 2018 16:34:56 +1000
changeset 821310 3f0b89c6e8f54e34afa19c74a0574a258912c940
parent 820708 65c4bfe46746830557b6ce809f6966c1fade344c
push id117060
push userxquan@mozilla.com
push dateSun, 22 Jul 2018 22:53:15 +0000
reviewersfroydnj
bugs1476475
milestone63.0a1
Bug 1476475 - Use -W4 for certverifier with clang-cl. r=froydnj MozReview-Commit-ID: 9OVJ2CFO0Qb
security/certverifier/moz.build
--- 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'