Bug 1384449 - Implement the support of when= for js_option r?glandium draft
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 26 Jul 2017 10:22:47 +0200
changeset 615733 f7d5cfe7f1d642f85aa8e4a789180eb8e7c8e9ee
parent 615715 6f1188264e320723569db43d2d72d61e58ae1b75
child 639256 a743e2f0501f06c81ade5b1c24393d9b392240b4
push id70448
push userbmo:sledru@mozilla.com
push dateWed, 26 Jul 2017 08:52:20 +0000
reviewersglandium
bugs1384449
milestone56.0a1
Bug 1384449 - Implement the support of when= for js_option r?glandium MozReview-Commit-ID: Eg4klzaCaAH
build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -896,19 +896,20 @@ 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):
+    when = kwargs.get('when')
     opt = option(*args, **kwargs)
 
-    @depends(opt.option, build_project)
+    @depends(opt.option, build_project, when=when)
     def js_option(value, build_project):
         if build_project != 'js':
             return value.format(opt.option)
 
     add_old_configure_arg(js_option)
 
 
 # Bug 1278542: This function is a workaround to resolve