forked from mirrors/gecko-dev
Bug 844509 - Always encode config.status as utf-8. r=nalexander
Now that there is no bytes strings in it, we don't need to store config.status in the system encoding to keep those valid. Moreover, the system encoding is lossy, which utf-8 is not. Differential Revision: https://phabricator.services.mozilla.com/D42731 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
04e3b11dcf
commit
ad930b523d
1 changed files with 3 additions and 4 deletions
|
|
@ -24,7 +24,6 @@ from mozbuild.pythonutil import iter_modules_in_path
|
|||
from mozbuild.backend.configenvironment import PartialConfigEnvironment
|
||||
from mozbuild.util import (
|
||||
indented_repr,
|
||||
system_encoding,
|
||||
)
|
||||
import mozpack.path as mozpath
|
||||
import six
|
||||
|
|
@ -102,12 +101,12 @@ def config_status(config):
|
|||
# here, when we're able to skip configure tests/use cached results/not rely
|
||||
# on autoconf.
|
||||
logging.getLogger('moz.configure').info('Creating config.status')
|
||||
with codecs.open('config.status', 'w', system_encoding) as fh:
|
||||
with codecs.open('config.status', 'w', 'utf-8') as fh:
|
||||
fh.write(textwrap.dedent('''\
|
||||
#!%(python)s
|
||||
# coding=%(encoding)s
|
||||
# coding=utf-8
|
||||
from __future__ import unicode_literals
|
||||
''') % {'python': config['PYTHON'], 'encoding': system_encoding})
|
||||
''') % {'python': config['PYTHON']})
|
||||
for k, v in six.iteritems(sanitized_config):
|
||||
fh.write('%s = %s\n' % (k, indented_repr(v)))
|
||||
fh.write("__all__ = ['topobjdir', 'topsrcdir', 'defines', "
|
||||
|
|
|
|||
Loading…
Reference in a new issue