Bug 1354581 - Make automation builds imply --enable-release at the configure level. r?chmanchester
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1044,16 +1044,17 @@ imply_option('--enable-pie', depends_if(
option(env='RUSTFLAGS',
nargs=1,
help='Rust compiler flags')
set_config('RUSTFLAGS', depends('RUSTFLAGS')(lambda flags: flags))
imply_option('--enable-release', mozilla_official)
+imply_option('--enable-release', depends_if('MOZ_AUTOMATION')(lambda x: True))
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:
--- a/build/mozconfig.common
+++ b/build/mozconfig.common
@@ -9,18 +9,16 @@
# architectures, though note that if you want to override options set in
# another mozconfig file, you'll need to use mozconfig.common.override instead
# of this file.
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-crashreporter
-ac_add_options --enable-release
-
# Tell the build system where to find llvm-config for builds on automation.
export LLVM_CONFIG="${TOOLTOOL_DIR:-$topsrcdir}/clang/bin/llvm-config"
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
--- a/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
@@ -75,11 +75,13 @@ class TestToolkitMozConfigure(BaseConfig
self.assertEqual(get_value(environ={'MOZILLA_OFFICIAL': 1}), None)
self.assertEqual(get_value(['--enable-release'],
environ={'MOZILLA_OFFICIAL': 1}), None)
with self.assertRaises(InvalidOptionError):
get_value(['--disable-release'], environ={'MOZILLA_OFFICIAL': 1})
+ self.assertEqual(get_value(environ={'MOZ_AUTOMATION': 1}), None)
+
if __name__ == '__main__':
main()