From deaa22c0de7f23ea52cf353a411d74eb0b0425f2 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Thu, 19 Jul 2018 11:19:52 +1000 Subject: [PATCH] Bug 1476486 - Apply clang warning suppression (rather than msvc) in pkix for clang-cl. r=froydnj MozReview-Commit-ID: 6BCF6VYMI88 --HG-- extra : rebase_source : acb77172e80d551f4f93bcee11e4f47d5c30341c --- security/pkix/test/gtest/moz.build | 6 +++--- security/pkix/warnings.mozbuild | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/security/pkix/test/gtest/moz.build b/security/pkix/test/gtest/moz.build index f425cce1f3aa..d9fa10e60da2 100644 --- a/security/pkix/test/gtest/moz.build +++ b/security/pkix/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>::... '-wd4275', # non dll-interface class used as base for dll-interface class diff --git a/security/pkix/warnings.mozbuild b/security/pkix/warnings.mozbuild index c2fa546974c9..f89d7fb74bed 100644 --- a/security/pkix/warnings.mozbuild +++ b/security/pkix/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.