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
--- 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,