Bug 1292463 - Always set --enable-warnings-as-errors for MOZ_AUTOMATION builds. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 09 Aug 2016 07:51:46 +0900
changeset 398344 cb9aae8abb61aa79ef159f412ee785ab19011b9d
parent 398343 d974371c9312fe95281c41925931e8a02c9ad15c
child 398345 38915e2c6ca97e0340b2d6ce914b40466f6714b3
push id25498
push userbmo:mh+mozilla@glandium.org
push dateTue, 09 Aug 2016 00:16:15 +0000
reviewerschmanchester
bugs1292463
milestone51.0a1
Bug 1292463 - Always set --enable-warnings-as-errors for MOZ_AUTOMATION builds. r?chmanchester And remove it from mozconfigs.
b2g/config/mozconfigs/linux32_gecko/debug
b2g/config/mozconfigs/linux32_gecko/nightly
b2g/config/mozconfigs/linux64_gecko/nightly
b2g/config/mozconfigs/macosx64_gecko/debug
b2g/config/mozconfigs/macosx64_gecko/nightly
b2g/dev/config/mozconfigs/macosx64/mulet
b2g/graphene/config/horizon-mozconfigs/linux32/debug
b2g/graphene/config/horizon-mozconfigs/linux32/nightly
b2g/graphene/config/horizon-mozconfigs/linux64/debug
b2g/graphene/config/horizon-mozconfigs/linux64/nightly
b2g/graphene/config/horizon-mozconfigs/macosx64/debug
b2g/graphene/config/horizon-mozconfigs/macosx64/nightly
b2g/graphene/config/horizon-mozconfigs/win64/debug
b2g/graphene/config/mozconfigs/linux32/debug
b2g/graphene/config/mozconfigs/linux32/nightly
b2g/graphene/config/mozconfigs/linux64/debug
b2g/graphene/config/mozconfigs/linux64/nightly
b2g/graphene/config/mozconfigs/macosx64/debug
b2g/graphene/config/mozconfigs/macosx64/nightly
b2g/graphene/config/mozconfigs/win64/debug
browser/config/mozconfigs/linux32/common-opt
browser/config/mozconfigs/linux32/debug
browser/config/mozconfigs/linux64/common-opt
browser/config/mozconfigs/linux64/debug
browser/config/mozconfigs/linux64/debug-static-analysis-clang
browser/config/mozconfigs/linux64/opt-static-analysis-clang
browser/config/mozconfigs/macosx-universal/common-opt
browser/config/mozconfigs/macosx64/debug
browser/config/mozconfigs/macosx64/debug-static-analysis
browser/config/mozconfigs/macosx64/nightly
browser/config/mozconfigs/macosx64/opt-static-analysis
browser/config/mozconfigs/win32/common-opt
browser/config/mozconfigs/win32/debug
browser/config/mozconfigs/win32/debug-static-analysis
browser/config/mozconfigs/win64/common-opt
browser/config/mozconfigs/win64/debug
build/moz.configure/warnings.configure
mobile/android/config/mozconfigs/android-api-15/debug
mobile/android/config/mozconfigs/android-x86/debug
mobile/android/config/mozconfigs/common
--- a/b2g/config/mozconfigs/linux32_gecko/debug
+++ b/b2g/config/mozconfigs/linux32_gecko/debug
@@ -13,19 +13,16 @@ ac_add_options --enable-debug
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 
 #B2G options
 ac_add_options --enable-application=b2g
 ENABLE_MARIONETTE=1
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
--- a/b2g/config/mozconfigs/linux32_gecko/nightly
+++ b/b2g/config/mozconfigs/linux32_gecko/nightly
@@ -13,19 +13,16 @@ ac_add_options --enable-signmar
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 
 #B2G options
 ac_add_options --enable-application=b2g
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 GAIADIR=$topsrcdir/gaia
--- a/b2g/config/mozconfigs/linux64_gecko/nightly
+++ b/b2g/config/mozconfigs/linux64_gecko/nightly
@@ -13,19 +13,16 @@ ac_add_options --enable-signmar
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 
 #B2G options
 ac_add_options --enable-application=b2g
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 GAIADIR=$topsrcdir/gaia
--- a/b2g/config/mozconfigs/macosx64_gecko/debug
+++ b/b2g/config/mozconfigs/macosx64_gecko/debug
@@ -12,19 +12,16 @@ ac_add_options --enable-signmar
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 #ac_add_options --with-macbundlename-prefix=Firefox
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # B2G Stuff
 ac_add_options --enable-application=b2g
 ac_add_options --enable-debug-symbols
 ac_add_options --enable-debug
 ENABLE_MARIONETTE=1
 
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
--- a/b2g/config/mozconfigs/macosx64_gecko/nightly
+++ b/b2g/config/mozconfigs/macosx64_gecko/nightly
@@ -13,19 +13,16 @@ ac_add_options --enable-signmar
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 #ac_add_options --with-macbundlename-prefix=Firefox
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # B2G Stuff
 ac_add_options --enable-application=b2g
 ac_add_options --enable-debug-symbols
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 GAIADIR=$topsrcdir/gaia
 
 # Include Firefox OS fonts.
--- a/b2g/dev/config/mozconfigs/macosx64/mulet
+++ b/b2g/dev/config/mozconfigs/macosx64/mulet
@@ -12,19 +12,16 @@ ac_add_options --enable-profiling
 ac_add_options --enable-instruments
 ac_add_options --enable-dtrace
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 ac_add_options --with-macbundlename-prefix=Firefox
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 # Include Firefox OS fonts.
 MOZTTDIR=$topsrcdir/moz-tt
 
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/b2g/graphene/config/horizon-mozconfigs/linux32/debug
+++ b/b2g/graphene/config/horizon-mozconfigs/linux32/debug
@@ -9,19 +9,16 @@ ac_add_options --enable-debug
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 ENABLE_MARIONETTE=1
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
--- a/b2g/graphene/config/horizon-mozconfigs/linux32/nightly
+++ b/b2g/graphene/config/horizon-mozconfigs/linux32/nightly
@@ -10,19 +10,16 @@ ac_add_options --enable-signmar
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/horizon-mozconfigs/common.override"
--- a/b2g/graphene/config/horizon-mozconfigs/linux64/debug
+++ b/b2g/graphene/config/horizon-mozconfigs/linux64/debug
@@ -9,19 +9,16 @@ ac_add_options --enable-debug
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 ENABLE_MARIONETTE=1
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
--- a/b2g/graphene/config/horizon-mozconfigs/linux64/nightly
+++ b/b2g/graphene/config/horizon-mozconfigs/linux64/nightly
@@ -10,19 +10,16 @@ ac_add_options --enable-signmar
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/horizon-mozconfigs/common.override"
--- a/b2g/graphene/config/horizon-mozconfigs/macosx64/debug
+++ b/b2g/graphene/config/horizon-mozconfigs/macosx64/debug
@@ -8,19 +8,16 @@ no_sccache=
 # Nightlies only since this has a cost in performance
 ac_add_options --enable-js-diagnostics
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 #ac_add_options --with-macbundlename-prefix=Firefox
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # graphene Stuff
 ac_add_options --enable-debug-symbols
 ac_add_options --enable-debug
 ENABLE_MARIONETTE=1
 
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/horizon-mozconfigs/common.override"
--- a/b2g/graphene/config/horizon-mozconfigs/macosx64/nightly
+++ b/b2g/graphene/config/horizon-mozconfigs/macosx64/nightly
@@ -11,16 +11,13 @@ ac_add_options --enable-signmar
 # Nightlies only since this has a cost in performance
 ac_add_options --enable-js-diagnostics
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 #ac_add_options --with-macbundlename-prefix=Firefox
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # graphene Stuff
 ac_add_options --enable-debug-symbols
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/horizon-mozconfigs/common.override"
--- a/b2g/graphene/config/horizon-mozconfigs/win64/debug
+++ b/b2g/graphene/config/horizon-mozconfigs/win64/debug
@@ -15,19 +15,16 @@ if [ -f /c/builds/google-oauth-api.key ]
 else
   _google_oauth_api_keyfile=/e/builds/google-oauth-api.key
 fi
 ac_add_options --with-google-oauth-api-keyfile=${_google_oauth_api_keyfile}
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 . $topsrcdir/build/win64/mozconfig.vs-latest
 
 . "$topsrcdir/build/mozconfig.cache"
 
 . "$topsrcdir/b2g/graphene/config/horizon-mozconfigs/common.override"
--- a/b2g/graphene/config/mozconfigs/linux32/debug
+++ b/b2g/graphene/config/mozconfigs/linux32/debug
@@ -9,19 +9,16 @@ ac_add_options --enable-debug
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 ENABLE_MARIONETTE=1
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
--- a/b2g/graphene/config/mozconfigs/linux32/nightly
+++ b/b2g/graphene/config/mozconfigs/linux32/nightly
@@ -10,19 +10,16 @@ ac_add_options --enable-signmar
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/mozconfigs/common.override"
--- a/b2g/graphene/config/mozconfigs/linux64/debug
+++ b/b2g/graphene/config/mozconfigs/linux64/debug
@@ -9,19 +9,16 @@ ac_add_options --enable-debug
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 ENABLE_MARIONETTE=1
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
--- a/b2g/graphene/config/mozconfigs/linux64/nightly
+++ b/b2g/graphene/config/mozconfigs/linux64/nightly
@@ -10,19 +10,16 @@ ac_add_options --enable-signmar
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Use sccache
 no_sccache=
 . "$topsrcdir/build/mozconfig.cache"
 
 # graphene options
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/mozconfigs/common.override"
--- a/b2g/graphene/config/mozconfigs/macosx64/debug
+++ b/b2g/graphene/config/mozconfigs/macosx64/debug
@@ -8,19 +8,16 @@ no_sccache=
 # Nightlies only since this has a cost in performance
 ac_add_options --enable-js-diagnostics
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 #ac_add_options --with-macbundlename-prefix=Firefox
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # graphene Stuff
 ac_add_options --enable-debug-symbols
 ac_add_options --enable-debug
 ENABLE_MARIONETTE=1
 
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/mozconfigs/common.override"
--- a/b2g/graphene/config/mozconfigs/macosx64/nightly
+++ b/b2g/graphene/config/mozconfigs/macosx64/nightly
@@ -11,16 +11,13 @@ ac_add_options --enable-signmar
 # Nightlies only since this has a cost in performance
 ac_add_options --enable-js-diagnostics
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 #ac_add_options --with-macbundlename-prefix=Firefox
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # graphene Stuff
 ac_add_options --enable-debug-symbols
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 . "$topsrcdir/b2g/graphene/config/mozconfigs/common.override"
--- a/b2g/graphene/config/mozconfigs/win64/debug
+++ b/b2g/graphene/config/mozconfigs/win64/debug
@@ -15,19 +15,16 @@ if [ -f /c/builds/google-oauth-api.key ]
 else
   _google_oauth_api_keyfile=/e/builds/google-oauth-api.key
 fi
 ac_add_options --with-google-oauth-api-keyfile=${_google_oauth_api_keyfile}
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 . $topsrcdir/build/win64/mozconfig.vs-latest
 
 . "$topsrcdir/build/mozconfig.cache"
 
 . "$topsrcdir/b2g/graphene/config/mozconfigs/common.override"
--- a/browser/config/mozconfigs/linux32/common-opt
+++ b/browser/config/mozconfigs/linux32/common-opt
@@ -7,13 +7,10 @@ ac_add_options --with-mozilla-api-keyfil
 
 . $topsrcdir/build/unix/mozconfig.linux32
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
--- a/browser/config/mozconfigs/linux32/debug
+++ b/browser/config/mozconfigs/linux32/debug
@@ -10,19 +10,16 @@ MOZ_AUTOMATION_L10N_CHECK=0
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Enable Telemetry
 export MOZ_TELEMETRY_REPORTING=1
 
 #Use ccache
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
 . "$topsrcdir/build/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/common-opt
+++ b/browser/config/mozconfigs/linux64/common-opt
@@ -7,13 +7,10 @@ ac_add_options --with-mozilla-api-keyfil
 
 . $topsrcdir/build/unix/mozconfig.linux
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
--- a/browser/config/mozconfigs/linux64/debug
+++ b/browser/config/mozconfigs/linux64/debug
@@ -8,19 +8,16 @@ MOZ_AUTOMATION_L10N_CHECK=0
 . $topsrcdir/build/unix/mozconfig.linux
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Enable Telemetry
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
 . "$topsrcdir/build/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/debug-static-analysis-clang
+++ b/browser/config/mozconfigs/linux64/debug-static-analysis-clang
@@ -9,18 +9,15 @@ ac_add_options --enable-dmd
 
 # Use Clang as specified in manifest
 export CC="$topsrcdir/clang/bin/clang"
 export CXX="$topsrcdir/clang/bin/clang++"
 
 # Add the static checker
 ac_add_options --enable-clang-plugin
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 . "$topsrcdir/build/unix/mozconfig.stdcxx"
 
 export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
 . $topsrcdir/build/unix/mozconfig.gtk
 
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/opt-static-analysis-clang
+++ b/browser/config/mozconfigs/linux64/opt-static-analysis-clang
@@ -8,18 +8,15 @@ ac_add_options --enable-dmd
 
 # Use Clang as specified in manifest
 CC="$topsrcdir/clang/bin/clang"
 CXX="$topsrcdir/clang/bin/clang++"
 
 # Add the static checker
 ac_add_options --enable-clang-plugin
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 . "$topsrcdir/build/unix/mozconfig.stdcxx"
 
 export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
 . $topsrcdir/build/unix/mozconfig.gtk
 
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx-universal/common-opt
+++ b/browser/config/mozconfigs/macosx-universal/common-opt
@@ -10,13 +10,10 @@ ac_add_options --with-google-api-keyfile
 ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
 ac_add_options --with-mozilla-api-keyfile=/builds/mozilla-desktop-geoloc-api.key
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
--- a/browser/config/mozconfigs/macosx64/debug
+++ b/browser/config/mozconfigs/macosx64/debug
@@ -10,19 +10,16 @@ export MOZILLA_OFFICIAL=1
 
 # Enable Telemetry
 export MOZ_TELEMETRY_REPORTING=1
 
 if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
 ac_add_options --with-macbundlename-prefix=Firefox
 fi
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
 . "$topsrcdir/build/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/debug-static-analysis
+++ b/browser/config/mozconfigs/macosx64/debug-static-analysis
@@ -2,15 +2,12 @@ MOZ_AUTOMATION_BUILD_SYMBOLS=0
 MOZ_AUTOMATION_PACKAGE_TESTS=0
 MOZ_AUTOMATION_L10N_CHECK=0
 
 . $topsrcdir/build/macosx/mozconfig.common
 
 ac_add_options --enable-debug
 ac_add_options --enable-dmd
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 ac_add_options --enable-clang-plugin
 
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/nightly
+++ b/browser/config/mozconfigs/macosx64/nightly
@@ -8,19 +8,16 @@ export MOZILLA_OFFICIAL=1
 
 # Enable Telemetry
 export MOZ_TELEMETRY_REPORTING=1
 
 if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
 ac_add_options --with-macbundlename-prefix=Firefox
 fi
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
 . "$topsrcdir/build/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/opt-static-analysis
+++ b/browser/config/mozconfigs/macosx64/opt-static-analysis
@@ -3,17 +3,14 @@ MOZ_AUTOMATION_PACKAGE_TESTS=0
 MOZ_AUTOMATION_L10N_CHECK=0
 
 . $topsrcdir/build/macosx/mozconfig.common
 
 ac_add_options --disable-debug
 ac_add_options --enable-optimize
 ac_add_options --enable-dmd
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 ac_add_options --enable-clang-plugin
 
 . "$topsrcdir/build/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
 
--- a/browser/config/mozconfigs/win32/common-opt
+++ b/browser/config/mozconfigs/win32/common-opt
@@ -23,19 +23,16 @@ ac_add_options --with-mozilla-api-keyfil
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 . $topsrcdir/build/win32/mozconfig.vs-latest
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Enable Adobe Primetime CDM on 32-bit Windows in Mozilla builds.
 # Enabled here on the assumption that downstream vendors will not be using
 # these build configs.
 # Note: Widevine is automatically enabled by the build, and can be
 # disabled with -widevine.
 ac_add_options --enable-eme=+adobe
 
 # Package js shell.
--- a/browser/config/mozconfigs/win32/debug
+++ b/browser/config/mozconfigs/win32/debug
@@ -18,19 +18,16 @@ ac_add_options --with-google-oauth-api-k
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Enable Telemetry
 export MOZ_TELEMETRY_REPORTING=1
 
 . $topsrcdir/build/win32/mozconfig.vs-latest
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
 . "$topsrcdir/build/mozconfig.rust"
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/win32/debug-static-analysis
+++ b/browser/config/mozconfigs/win32/debug-static-analysis
@@ -7,16 +7,13 @@ MOZ_AUTOMATION_L10N_CHECK=0
 
 ac_add_options --enable-debug
 ac_add_options --enable-dmd
 
 ac_add_options --enable-clang-plugin
 
 . $topsrcdir/build/win32/mozconfig.vs-latest
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 . "$topsrcdir/build/mozconfig.rust"
 
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
 . "$topsrcdir/build/mozconfig.clang-cl"
--- a/browser/config/mozconfigs/win64/common-opt
+++ b/browser/config/mozconfigs/win64/common-opt
@@ -19,19 +19,16 @@ fi
 ac_add_options --with-google-oauth-api-keyfile=${_google_oauth_api_keyfile}
 ac_add_options --with-mozilla-api-keyfile=/c/builds/mozilla-desktop-geoloc-api.key
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 . $topsrcdir/build/win64/mozconfig.vs-latest
 
 # Enable Adobe Primetime CDM on 64-bit Windows in Mozilla builds.
 # Enabled here on the assumption that downstream vendors will not be using
 # these build configs.
 # Note: Widevine is automatically enabled by the build, and can be
 # disabled with -widevine.
 ac_add_options --enable-eme=+adobe
--- a/browser/config/mozconfigs/win64/debug
+++ b/browser/config/mozconfigs/win64/debug
@@ -18,19 +18,16 @@ fi
 ac_add_options --with-google-oauth-api-keyfile=${_google_oauth_api_keyfile}
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Enable Telemetry
 export MOZ_TELEMETRY_REPORTING=1
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
 . $topsrcdir/build/win64/mozconfig.vs-latest
 
 . "$topsrcdir/build/mozconfig.rust"
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -1,12 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 option('--enable-warnings-as-errors', env='MOZ_ENABLE_WARNINGS_AS_ERRORS',
+       default=depends('MOZ_AUTOMATION', '--help')(lambda x, _: bool(x)),
        help='Enable treating warnings as errors')
 
 add_old_configure_assignment(
     'MOZ_ENABLE_WARNINGS_AS_ERRORS',
     depends('--enable-warnings-as-errors')(lambda x: bool(x)))
--- a/mobile/android/config/mozconfigs/android-api-15/debug
+++ b/mobile/android/config/mozconfigs/android-api-15/debug
@@ -8,12 +8,9 @@ ENABLE_MARIONETTE=1
 ac_add_options --with-android-min-sdk=15
 ac_add_options --target=arm-linux-androideabi
 
 export MOZILLA_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 
 ac_add_options --with-branding=mobile/android/branding/nightly
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 . "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-x86/debug
+++ b/mobile/android/config/mozconfigs/android-x86/debug
@@ -7,12 +7,9 @@ ac_add_options --enable-debug
 ac_add_options --target=i386-linux-android
 ac_add_options --with-android-min-sdk=15
 
 export MOZILLA_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 
 ac_add_options --with-branding=mobile/android/branding/nightly
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 . "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -42,19 +42,16 @@ ac_add_options --with-android-sdk="$tops
 if [ -z "$NO_NDK" ]; then
     ac_add_options --with-android-ndk="$topsrcdir/android-ndk"
     ac_add_options --with-android-gnu-compiler-version=4.9
 fi
 
 ac_add_options --with-system-zlib
 ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
 
-# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
-ac_add_options --enable-warnings-as-errors
-
 ac_add_options --with-mozilla-api-keyfile=/builds/mozilla-fennec-geoloc-api.key
 
 # MOZ_INSTALL_TRACKING does not guarantee MOZ_UPDATE_CHANNEL will be set so we
 # provide a default state. Currently, the default state provides a default
 # keyfile because an assertion will be thrown if MOZ_INSTALL_TRACKING is
 # specified but a keyfile is not. This assertion can catch if we misconfigure a
 # release or beta build and it does not have a valid keyfile.
 #