Bug 1467041 - Default to --enable-release when milestone is beta/release. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 06 Jun 2018 16:13:09 +0900
changeset 804514 33b85c29f54dbb81da93cb01751ead003e09edcf
parent 804493 da28b92efe6f6acaf79545697415b82038143338
push id112400
push userbmo:mh+mozilla@glandium.org
push dateWed, 06 Jun 2018 07:24:12 +0000
reviewersbuild
bugs1467041
milestone62.0a1
Bug 1467041 - Default to --enable-release when milestone is beta/release. r?build --enable-release not being passed means developer options are enabled, which is generally speaking not desirable for builds meant to be shipped. This is somewhat alleviated for Firefox by MOZILLA_OFFICIAL implying --enable-release (as well as MOZ_AUTOMATION), but that doesn't apply to e.g. standalone js builds (even some of the standalone js jobs on our automation don't set MOZ_AUTOMATION for some reason). A reasonable thing to do is just to default builds for release/beta milestones to --enable-release, but still allow --disable-release to enable the developer options.
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -3,16 +3,17 @@
 # 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/.
 
 imply_option('--enable-release', mozilla_official)
 imply_option('--enable-release', depends_if('MOZ_AUTOMATION')(lambda x: True))
 
 js_option('--enable-release',
+          default=milestone.is_release_or_beta,
           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