Bug 1292463 - Move --enable-warnings-as-errors to python configure. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 05 Aug 2016 16:07:18 +0900
changeset 350148 b0e40bebd7374bf3bc4eed70230944e1d61c8491
parent 350147 f5b446567ab87049256dd680b2359592c365ba5e
child 350149 305fce838f23b7b3c73a0c6fea3660587c24ddab
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1292463
milestone51.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 1292463 - Move --enable-warnings-as-errors to python configure. r=chmanchester
b2g/common.configure
b2g/confvars.sh
b2g/graphene/confvars.sh
build/moz.configure/old.configure
build/moz.configure/warnings.configure
js/src/old-configure.in
moz.configure
old-configure.in
--- a/b2g/common.configure
+++ b/b2g/common.configure
@@ -20,10 +20,12 @@ set_config('MOZTTDIR', mozttdir)
 
 @depends('MOZTTDIR')
 def package_moztt(value):
     if value:
         return True
 
 set_define('PACKAGE_MOZTT', package_moztt)
 
+imply_option('MOZ_ENABLE_WARNINGS_AS_ERRORS',
+             depends(target)(lambda t: t.os == 'Android'), reason='--target')
 
 include('../toolkit/moz.configure')
--- a/b2g/confvars.sh
+++ b/b2g/confvars.sh
@@ -47,17 +47,13 @@ MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f
 
 MOZ_TIME_MANAGER=1
 
 MOZ_SIMPLEPUSH=1
 MOZ_PAY=1
 MOZ_TOOLKIT_SEARCH=
 MOZ_B2G=1
 
-if test "$OS_TARGET" = "Android"; then
-MOZ_ENABLE_WARNINGS_AS_ERRORS=1
-fi
-
 MOZ_JSDOWNLOADS=1
 
 MOZ_BUNDLED_FONTS=1
 
 export JS_GC_SMALL_CHUNK_SIZE=1
--- a/b2g/graphene/confvars.sh
+++ b/b2g/graphene/confvars.sh
@@ -42,20 +42,16 @@ fi
 MOZ_APP_ID={d1bfe7d9-c01e-4237-998b-7b5f960a4314}
 MOZ_TIME_MANAGER=1
 
 MOZ_PAY=1
 MOZ_TOOLKIT_SEARCH=
 MOZ_PLACES=
 MOZ_B2G=1
 
-if test "$OS_TARGET" = "Android"; then
-MOZ_ENABLE_WARNINGS_AS_ERRORS=1
-fi
-
 MOZ_JSDOWNLOADS=1
 
 MOZ_BUNDLED_FONTS=1
 
 export JS_GC_SMALL_CHUNK_SIZE=1
 
 # Include the DevTools client, not just the server (which is the default)
 MOZ_DEVTOOLS=all
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -251,17 +251,16 @@ def old_configure_options(*options):
     '--enable-trace-logging',
     '--enable-tree-freetype',
     '--enable-ui-locale',
     '--enable-universalchardet',
     '--enable-updater',
     '--enable-url-classifier',
     '--enable-valgrind',
     '--enable-verify-mar',
-    '--enable-warnings-as-errors',
     '--enable-webapp-runtime',
     '--enable-webrtc',
     '--enable-websms-backend',
     '--enable-webspeech',
     '--enable-webspeechtestbackend',
     '--enable-xul',
     '--enable-zipwriter',
     '--no-create',
new file mode 100644
--- /dev/null
+++ b/build/moz.configure/warnings.configure
@@ -0,0 +1,12 @@
+# -*- 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/.
+
+js_option('--enable-warnings-as-errors', env='MOZ_ENABLE_WARNINGS_AS_ERRORS',
+          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/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -508,25 +508,16 @@ if test -n "${CLANG_CC}${CLANG_CL}"; the
 fi
 if test -n "${CLANG_CXX}${CLANG_CL}"; then
     _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}"
 fi
 
 MOZ_CONFIG_SANITIZE
 
 dnl ========================================================
-dnl = Enable treating compiler warnings as errors
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(warnings-as-errors,
-[  --enable-warnings-as-errors
-                          Enable treating warnings as errors],
-    MOZ_ENABLE_WARNINGS_AS_ERRORS=1,
-    MOZ_ENABLE_WARNINGS_AS_ERRORS=)
-
-dnl ========================================================
 dnl GNU specific defaults
 dnl ========================================================
 if test "$GNU_CC"; then
     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
     DSO_LDOPTS='-shared'
     if test "$GCC_USE_GNU_LD"; then
         # Some tools like ASan use a runtime library that is only
--- a/moz.configure
+++ b/moz.configure
@@ -94,16 +94,18 @@ add_old_configure_assignment('MOZ_DEBUG'
                              depends('--enable-debug')(lambda v: bool(v)))
 
 include_when('build/moz.configure/toolchain.configure',
              when='--enable-compile-environment')
 include_when('build/moz.configure/memory.configure',
              when='--enable-compile-environment')
 include_when('build/moz.configure/headers.configure',
              when='--enable-compile-environment')
+include_when('build/moz.configure/warnings.configure',
+             when='--enable-compile-environment')
 
 @depends('--help')
 @imports(_from='mozbuild.backend', _import='backends')
 def build_backends_choices(help):
     return tuple(backends)
 
 
 @deprecated_option('--enable-build-backend', nargs='+',
--- a/old-configure.in
+++ b/old-configure.in
@@ -672,25 +672,16 @@ if test -n "${CLANG_CXX}${CLANG_CL}"; th
     _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}"
 fi
 
 if test -n "$COMPILE_ENVIRONMENT"; then
    MOZ_CONFIG_SANITIZE
 fi
 
 dnl ========================================================
-dnl = Enable treating compiler warnings as errors
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(warnings-as-errors,
-[  --enable-warnings-as-errors
-                          Enable treating warnings as errors],
-    MOZ_ENABLE_WARNINGS_AS_ERRORS=1,
-    MOZ_ENABLE_WARNINGS_AS_ERRORS=)
-
-dnl ========================================================
 dnl GNU specific defaults
 dnl ========================================================
 if test "$GNU_CC"; then
     MMX_FLAGS="-mmmx"
     SSE_FLAGS="-msse"
     SSE2_FLAGS="-msse2"
     SSSE3_FLAGS="-mssse3"
     # FIXME: Let us build with strict aliasing. bug 414641.