Bug 1477744 - Re-enable -Werror in clang-cl for Spidermonkey. r=froydnj
authorDavid Major <dmajor@mozilla.com>
Thu, 26 Jul 2018 16:14:27 -0400
changeset 428663 707eaef32a63301c8357a97297192327b9320764
parent 428662 3268a54a7fab9e9565038d589229e9f2bf1cdff9
child 428664 5846965a61de00e8ebc7582d30fb98582fe806dd
push id34339
push userdluca@mozilla.com
push dateFri, 27 Jul 2018 10:20:10 +0000
treeherdermozilla-central@87bcafe428a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1477744
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 1477744 - Re-enable -Werror in clang-cl for Spidermonkey. r=froydnj
old-configure.in
python/mozbuild/mozbuild/frontend/context.py
--- a/old-configure.in
+++ b/old-configure.in
@@ -1033,17 +1033,22 @@ case "$target" in
         fi
         # make 'foo == bar;' error out
         CFLAGS="$CFLAGS -we4553"
         CXXFLAGS="$CXXFLAGS -we4553"
         # Silence VS2017 15.5+ TR1 deprecation warnings hit by older gtest versions
         CXXFLAGS="$CXXFLAGS -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
         LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib"
         MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
-        WARNINGS_AS_ERRORS='-WX'
+        # -Werror is disabled on clang-cl until bug 1090497 cleans up the noise.
+        if test -n "$CLANG_CL"; then
+            WARNINGS_AS_ERRORS=''
+        else
+            WARNINGS_AS_ERRORS='-WX'
+        fi
         # Use a higher optimization level for clang-cl, so we can come closer
         # to MSVC's performance numbers (see bug 1443590).
         if test -n "$CLANG_CL"; then
             MOZ_OPTIMIZE_FLAGS='-O2'
         else
             MOZ_OPTIMIZE_FLAGS='-O1 -Oi'
         fi
         MOZ_FIX_LINK_PATHS=
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -482,26 +482,21 @@ class CompileFlags(BaseCompileFlags):
         if (self._context.config.substs.get('MOZ_DEBUG') or
             self._context.config.substs.get('MOZ_DEBUG_SYMBOLS')):
             return self._context.config.substs.get('MOZ_DEBUG_FLAGS', '').split()
         return []
 
     def _warnings_as_errors(self):
         warnings_as_errors = self._context.config.substs.get('WARNINGS_AS_ERRORS')
         if self._context.config.substs.get('MOZ_PGO'):
-            # Don't use warnings-as-errors in Windows PGO builds because it is suspected of
+            # Don't use warnings-as-errors in MSVC PGO builds because it is suspected of
             # causing problems in that situation. (See bug 437002.)
-            if self._context.config.substs['OS_ARCH'] == 'WINNT':
+            if self._context.config.substs.get('CC_TYPE') == 'msvc':
                 warnings_as_errors = None
 
-        if self._context.config.substs.get('CC_TYPE') == 'clang-cl':
-            # Don't use warnings-as-errors in clang-cl because it warns about many more
-            # things than MSVC does.
-            warnings_as_errors = None
-
         if warnings_as_errors:
             return [warnings_as_errors]
 
     def _optimize_flags(self):
         if not self._context.config.substs.get('MOZ_OPTIMIZE'):
             return []
         optimize_flags = None
         if self._context.config.substs.get('MOZ_PGO'):