Bug 1258618 - Allow to use bools as values given to add_old_configure_assignment. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 22 Mar 2016 13:47:37 +0900
changeset 289944 fa9a23bf9e17c37c06c131c1b713af32c4bf0957
parent 289943 aa4bcd9eadcb994886c14fd96d53aabeffe3f31c
child 289945 0f1ddce63248c64f491f1bee530f1cb538aa44e0
push id18337
push usercbook@mozilla.com
push dateWed, 23 Mar 2016 15:30:25 +0000
treeherderfx-team@67ac681f7e53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1258618
milestone48.0a1
Bug 1258618 - Allow to use bools as values given to add_old_configure_assignment. r=nalexander
build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -128,18 +128,23 @@ def old_configure_assignments(help):
 def extra_old_configure_args(help):
     return []
 
 @template
 def add_old_configure_assignment(var, value):
     @depends(old_configure_assignments)
     @advanced
     def add_assignment(assignments):
-        from mozbuild.shellutil import quote
-        assignments.append('%s=%s' % (var, quote(value)))
+        if value is True:
+            assignments.append('%s=1' % var)
+        elif value is False:
+            assignments.append('%s=' % var)
+        else:
+            from mozbuild.shellutil import quote
+            assignments.append('%s=%s' % (var, quote(value)))
 
 @template
 def add_old_configure_arg(arg):
     @depends(extra_old_configure_args)
     def add_arg(args):
         args.append(arg)