Bug 1354581 - Move --enable-release/DEVELOPER_OPTIONS to python configure. r?chmanchester
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -1,26 +1,16 @@
dnl This Source Code Form is subject to the terms of the Mozilla Public
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
dnl Add compiler specific options
AC_DEFUN([MOZ_DEFAULT_COMPILER],
[
-dnl set DEVELOPER_OPTIONS early; MOZ_DEFAULT_COMPILER is usually the first non-setup directive
- if test -z "$MOZILLA_OFFICIAL"; then
- DEVELOPER_OPTIONS=1
- fi
- MOZ_ARG_ENABLE_BOOL(release,
- [ --enable-release Build with more conservative, release engineering-oriented options.
- This may slow down builds.],
- DEVELOPER_OPTIONS=,
- DEVELOPER_OPTIONS=1)
-
dnl Default to MSVC for win32 and gcc-4.2 for darwin
dnl ==============================================================
if test -z "$CROSS_COMPILE"; then
case "$target" in
*-mingw*)
if test -z "$CPP"; then CPP="$CC -E -nologo"; fi
if test -z "$CXXCPP"; then CXXCPP="$CXX -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
if test -z "$AS"; then
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -208,17 +208,16 @@ def old_configure_options(*options):
'--enable-pie',
'--enable-png-arm-neon-support',
'--enable-posix-nspr-emulation',
'--enable-pref-extensions',
'--enable-pulseaudio',
'--enable-raw',
'--enable-readline',
'--enable-reflow-perf',
- '--enable-release',
'--enable-safe-browsing',
'--enable-sandbox',
'--enable-signmar',
'--enable-simulator',
'--enable-small-chunk-size',
'--enable-startup-notification',
'--enable-startupcache',
'--enable-stdcxx-compat',
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1041,8 +1041,22 @@ def security_hardening_cflags(value, c_c
add_old_configure_assignment('HARDENING_CFLAGS', security_hardening_cflags)
imply_option('--enable-pie', depends_if('--enable-hardening')(lambda v: v))
option(env='RUSTFLAGS',
nargs=1,
help='Rust compiler flags')
set_config('RUSTFLAGS', depends('RUSTFLAGS')(lambda flags: flags))
+
+
+imply_option('--enable-release', mozilla_official)
+
+js_option('--enable-release',
+ help='Build with more conservative, release engineering-oriented '
+ 'options. This may slow down builds.')
+
+@depends('--enable-release')
+def developer_options(value):
+ if not value:
+ return True
+
+add_old_configure_assignment('DEVELOPER_OPTIONS', developer_options)