Bug 1502457 - Move js_option around to make it available earlier. r=nalexander
☠☠ backed out by 1abdc7367834 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 15 Nov 2018 23:22:01 +0000
changeset 446683 73bb6a74cad00ed7e5e16eb5e6acd381dc6f0e7f
parent 446682 b172bda6e983e58470112700f5ca0d7d9d67edb9
child 446684 7ea52c602445bdc8ba042de6e8c7e4bf4b483739
push id35046
push userbtara@mozilla.com
push dateFri, 16 Nov 2018 09:46:36 +0000
treeherdermozilla-central@02f799e4c3da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1502457
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1502457 - Move js_option around to make it available earlier. r=nalexander Depends on D11984 Differential Revision: https://phabricator.services.mozilla.com/D11985
build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1031,16 +1031,31 @@ def build_project(include_project_config
     return ret
 
 
 set_config('MOZ_BUILD_APP', build_project)
 set_define('MOZ_BUILD_APP', build_project)
 add_old_configure_assignment('MOZ_BUILD_APP', build_project)
 
 
+# This is temporary until js/src/configure and configure are merged.
+# Use instead of option() in js/moz.configure and more generally, for
+# options that are shared between configure and js/src/configure.
+@template
+def js_option(*args, **kwargs):
+    opt = 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)
+
+
 # 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')
@@ -1212,23 +1227,8 @@ def all_configure_options():
         elif (option.help == 'Help missing for old configure options' and
                 option in __sandbox__._raw_options):
             result.append(__sandbox__._raw_options[option])
 
     return quote(*result)
 
 
 set_config('MOZ_CONFIGURE_OPTIONS', all_configure_options)
-
-
-# This is temporary until js/src/configure and configure are merged.
-# Use instead of option() in js/moz.configure and more generally, for
-# options that are shared between configure and js/src/configure.
-@template
-def js_option(*args, **kwargs):
-    opt = 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)