Skip to content

Commit

Permalink
Bug 1476486 - Apply clang warning suppression (rather than msvc) in p…
Browse files Browse the repository at this point in the history
…kix for clang-cl. r=froydnj

MozReview-Commit-ID: 6BCF6VYMI88

--HG--
extra : rebase_source : acb77172e80d551f4f93bcee11e4f47d5c30341c
  • Loading branch information
upsuper committed Jul 19, 2018
1 parent fb54e6b commit 667b270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/mozpkix/test/gtest/moz.build
Expand Up @@ -45,19 +45,19 @@ 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',
'-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
Expand Down
4 changes: 2 additions & 2 deletions lib/mozpkix/warnings.mozbuild
@@ -1,4 +1,4 @@
if CONFIG['CC_TYPE'] == 'clang':
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
CXXFLAGS += [
'-Weverything',

Expand All @@ -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.

Expand Down

0 comments on commit 667b270

Please sign in to comment.