summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXidorn Quan <me@upsuper.org>2018-07-19 11:19:52 +1000
committerXidorn Quan <me@upsuper.org>2018-07-19 11:19:52 +1000
commita6fa27bdd8bec089c84950f24c4875ed3e61ea57 (patch)
tree4c8c64469410b5991477b7ed6b09e0a6b4bd5e36
parent1f2ec3567a1e25840a156256c0405e9d292745c6 (diff)
downloadnss-hg-a6fa27bdd8bec089c84950f24c4875ed3e61ea57.tar.gz
Bug 1476486 - Apply clang warning suppression (rather than msvc) in pkix for clang-cl. r=froydnj
MozReview-Commit-ID: 6BCF6VYMI88
-rw-r--r--lib/mozpkix/test/gtest/moz.build6
-rw-r--r--lib/mozpkix/warnings.mozbuild4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/mozpkix/test/gtest/moz.build b/lib/mozpkix/test/gtest/moz.build
index f425cce1f..d9fa10e60 100644
--- a/lib/mozpkix/test/gtest/moz.build
+++ b/lib/mozpkix/test/gtest/moz.build
@@ -45,11 +45,11 @@ if CONFIG['CC_TYPE'] == 'gcc':
# 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',
@@ -57,7 +57,7 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
'-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
diff --git a/lib/mozpkix/warnings.mozbuild b/lib/mozpkix/warnings.mozbuild
index c2fa54697..f89d7fb74 100644
--- a/lib/mozpkix/warnings.mozbuild
+++ b/lib/mozpkix/warnings.mozbuild
@@ -1,4 +1,4 @@
-if CONFIG['CC_TYPE'] == 'clang':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
CXXFLAGS += [
'-Weverything',
@@ -10,7 +10,7 @@ if CONFIG['CC_TYPE'] == 'clang':
'-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.