Bug 1374824 - Fix --enable-stylo value processing; r?froydnj draft
authorGregory Szorc <gps@mozilla.com>
Wed, 21 Jun 2017 12:17:37 -0700
changeset 598519 043dbfac0e9d2b557d06ef9836710c32546a6999
parent 598405 6779547fa0fca357851739ebee9bfd461675c7aa
child 598520 d566d000017cab130d9c7d9ea755290274ab9a58
child 598547 9baf8c14f19db8d080065da890c2680f95c90e30
push id65221
push usergszorc@mozilla.com
push dateWed, 21 Jun 2017 19:17:56 +0000
reviewersfroydnj
bugs1374824
milestone56.0a1
Bug 1374824 - Fix --enable-stylo value processing; r?froydnj The argument passed to the function is a PositiveOptionValue, which represents its option values as a tuple. The __eq__ for this type first compares type() of the operands. Since the previous code compared a PositiveOptionValue to a string literal, this always failed. There's possibly room to improve the behavior of PositiveOptionValue. But for now, let's rewrite stylo_config() so it works. MozReview-Commit-ID: B4vkYwCDHrb
toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -626,17 +626,17 @@ option('--enable-stylo', nargs='?', choi
 @depends('--enable-stylo')
 def stylo_config(value):
     build_stylo = None
     enable_stylo = None
 
     # The default is to not build Stylo at all.
     if value.origin == 'default':
         pass
-    elif value == 'build':
+    elif len(value) and value[0] == 'build':
         build_stylo = True
     elif bool(value):
         build_stylo = True
         enable_stylo = True
 
     return namespace(
         build = build_stylo,
         enable = enable_stylo,