Bug 1502457 - Move MOZILLA_OFFICIAL to init.configure. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 15 Nov 2018 15:37:50 +0900
changeset 1760519 0911f69d98d057992b911c348522961869cfdf77
parent 1760518 88d8b1ecfacc2c55764417217d13784f73da4d96
child 1760520 037bcae08e0d0a6851182ab18af852142db854da
push id315272
push usermh@glandium.org
push dateThu, 15 Nov 2018 08:25:59 +0000
treeherdertry@8221e0fda796 [default view] [failures only]
reviewersbuild
bugs1502457
milestone65.0a1
Bug 1502457 - Move MOZILLA_OFFICIAL to init.configure. r?build Differential Revision: https://phabricator.services.mozilla.com/D11986
build/moz.configure/init.configure
moz.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1046,16 +1046,31 @@ def js_option(*args, **kwargs):
     @depends(opt.option, build_project, when=kwargs.get('when'))
     def js_option(value, build_project):
         if build_project != 'js':
             return value.format(opt.option)
 
     add_old_configure_arg(js_option)
 
 
+js_option(env='MOZILLA_OFFICIAL',
+          help='Build an official release')
+
+
+@depends('MOZILLA_OFFICIAL')
+def mozilla_official(official):
+    if official:
+        return True
+
+
+set_config('MOZILLA_OFFICIAL', mozilla_official)
+set_define('MOZILLA_OFFICIAL', mozilla_official)
+add_old_configure_assignment('MOZILLA_OFFICIAL', mozilla_official)
+
+
 # set RELEASE_OR_BETA and NIGHTLY_BUILD variables depending on the cycle we're in
 # The logic works like this:
 # - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
 # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
 # - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
 @depends(check_build_environment, build_project, '--help')
 @imports(_from='__builtin__', _import='open')
 @imports('os')
--- a/moz.configure
+++ b/moz.configure
@@ -64,28 +64,16 @@ js_option('--disable-tests',
 @depends('--disable-tests')
 def enable_tests(value):
     if value:
         return True
 
 set_config('ENABLE_TESTS', enable_tests)
 set_define('ENABLE_TESTS', enable_tests)
 
-js_option(env='MOZILLA_OFFICIAL',
-          help='Build an official release')
-
-@depends('MOZILLA_OFFICIAL')
-def mozilla_official(official):
-    if official:
-        return True
-
-set_config('MOZILLA_OFFICIAL', mozilla_official)
-set_define('MOZILLA_OFFICIAL', mozilla_official)
-add_old_configure_assignment('MOZILLA_OFFICIAL', mozilla_official)
-
 @depends(enable_tests)
 def gtest_has_rtti(value):
     if value:
         return '0'
 
 set_define('GTEST_HAS_RTTI', gtest_has_rtti)
 
 @depends(target, enable_tests)