From 8344c31d7c035286b371b045d916a91f616d9baf Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 16 Nov 2018 01:15:58 +0000 Subject: [PATCH] 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 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure index 7c0bc4d0627c1..d821b2781d4ba 100644 --- a/build/moz.configure/init.configure +++ b/build/moz.configure/init.configure @@ -1036,6 +1036,21 @@ 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) @@ -1220,18 +1235,3 @@ def all_configure_options(): 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)