Bug 1476486 - Apply clang warning suppression (rather than msvc) in pkix for clang-cl. r=froydnj
authorXidorn Quan <me@upsuper.org>
Thu, 19 Jul 2018 11:19:52 +1000
changeset 427310 bf4b4cfa51590a7856251bbdeeac8e4bed6a086e
parent 427309 0866ebeda09debe84bc079506419a212fd58b04b
child 427311 7fd7b91b7c2ae4ff2bed6ca6f6299373c48a28fb
push id34300
push userbtara@mozilla.com
push dateThu, 19 Jul 2018 21:47:01 +0000
treeherdermozilla-central@d67618d9ba00 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1476486
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1476486 - Apply clang warning suppression (rather than msvc) in pkix for clang-cl. r=froydnj MozReview-Commit-ID: 6BCF6VYMI88
security/pkix/test/gtest/moz.build
security/pkix/warnings.mozbuild
--- a/security/pkix/test/gtest/moz.build
+++ b/security/pkix/test/gtest/moz.build
@@ -40,29 +40,29 @@ include('../../warnings.mozbuild')
 # GTest uses a variadic macro in a questionable way and it doesn't seem to be
 # possible to selectively disable just that error when -pedantic-errors is set.
 if CONFIG['CC_TYPE'] == 'gcc':
   CXXFLAGS.remove('-pedantic-errors')
 
 # These warnings are disabled in order to minimize the amount of boilerplate
 # required to implement tests, and/or because they originate in the GTest
 # framework in a way we cannot otherwise work around.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
   CXXFLAGS += [
     '-Wno-old-style-cast',
   ]
-  if CONFIG['CC_TYPE'] == 'clang':
+  if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
       '-Wno-exit-time-destructors',
       '-Wno-global-constructors',
       '-Wno-thread-safety',
       '-Wno-used-but-marked-unused',
       '-Wno-zero-as-null-pointer-constant',
     ]
-elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+elif CONFIG['CC_TYPE'] == 'msvc':
   CXXFLAGS += [
     '-wd4350', # behavior change: 'std::_Wrap_alloc<std::allocator<_Ty>>::...
     '-wd4275', # non dll-interface class used as base for dll-interface class
     '-wd4548', # Expression before comma has no effect
     '-wd4625', # copy constructor could not be generated.
     '-wd4626', # assugment operator could not be generated.
     '-wd4640', # construction of local static object is not thread safe.
 
--- a/security/pkix/warnings.mozbuild
+++ b/security/pkix/warnings.mozbuild
@@ -1,21 +1,21 @@
-if CONFIG['CC_TYPE'] == 'clang':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
   CXXFLAGS += [
     '-Weverything',
 
     '-Wno-c++98-compat',
     '-Wno-c++98-compat-pedantic',
     '-Wno-missing-prototypes',
     '-Wno-missing-variable-declarations',
     '-Wno-padded',
     '-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.
   ]
-elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+elif CONFIG['CC_TYPE'] == 'msvc':
   CXXFLAGS += [
     '-sdl', # Enable additional security checks based on Microsoft's SDL.
 
     '-Wall',
 
     '-wd4464', # relative include path contains '..'
     '-wd4514', # 'function': unreferenced inline function has been removed
     '-wd4668', # warning C4668: 'X' is not defined as a preprocessor macro,