Bug 1595995 - Set MOZ_CONFIGURE_OPTIONS to an empty unicode string when it's empty. r=dmajor
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 13 Nov 2019 14:28:49 +0000
changeset 501825 0e1844d65a2504f02679253ae9a536887cddc720
parent 501824 7272d77d4e808dcbbd1f4f50210786dd326b218a
child 501826 7284aee6b994ea181160cecee018ce30506988de
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1595995
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1595995 - Set MOZ_CONFIGURE_OPTIONS to an empty unicode string when it's empty. r=dmajor Because quote([]) returns an empty byte string, configure currently fails. While ideally, quote would return an unicode string, it is not guaranteed that all uses of quote would actually handle this properly. Differential Revision: https://phabricator.services.mozilla.com/D52795
toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -34,16 +34,21 @@ def all_configure_options():
         # We however always include options that are sent to old configure
         # because we don't know their actual defaults. (Keep the conditions
         # separate for ease of understanding and ease of removal)
         elif (option.help == 'Help missing for old configure options' and
                 option in __sandbox__._raw_options):
             result.append(ensure_unicode(__sandbox__._raw_options[option],
                                          system_encoding))
 
+    # We shouldn't need this, but currently, quote will return a byte string
+    # if result is empty, and that's not wanted here.
+    if not result:
+        return ''
+
     return quote(*result)
 
 
 set_config('MOZ_CONFIGURE_OPTIONS', all_configure_options)
 
 # Profiling
 # ==============================================================
 # Some of the options here imply an option from js/moz.configure,