Bug 1354581 - Make automation builds imply --enable-release at the configure level. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 21 Jun 2017 11:33:30 +0900
changeset 599313 925ebf7855bb543dd471a85b03f025b7ce13db2a
parent 599312 770c0dee6a833538c0425049874c21046ae72eb5
child 634729 69aa786426b86a8a77ec26b2ddf0cbf6e3e82268
push id65477
push userbmo:mh+mozilla@glandium.org
push dateThu, 22 Jun 2017 23:09:31 +0000
reviewerschmanchester
bugs1354581
milestone56.0a1
Bug 1354581 - Make automation builds imply --enable-release at the configure level. r?chmanchester
build/moz.configure/toolchain.configure
build/mozconfig.common
python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
--- 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()