Skip to content

Commit 7812adf

Browse files
Rollup merge of rust-lang#42089 - nagisa:xpy-broke-on-py3-again⁈, r=alexcrichton
Fix x.py Fixes rust-lang#42085
2 parents 3fb27a0 + c5163aa commit 7812adf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bootstrap/bootstrap.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,14 @@ def run(self, args, env=None, cwd=None):
398398
sys.exit(ret)
399399

400400
def output(self, args, env=None, cwd=None):
401+
default_encoding = sys.getdefaultencoding()
401402
proc = subprocess.Popen(args, stdout=subprocess.PIPE, env=env, cwd=cwd)
402403
(out, err) = proc.communicate()
403404
ret = proc.wait()
404405
if ret != 0:
405406
print(out)
406407
sys.exit(ret)
407-
return out
408+
return out.decode(default_encoding)
408409

409410
def build_triple(self):
410411
default_encoding = sys.getdefaultencoding()
@@ -570,10 +571,10 @@ def update_submodules(self):
570571

571572
for submod in submodules:
572573
path, status = submod
573-
if path.endswith(b"llvm") and \
574+
if path.endswith('llvm') and \
574575
(self.get_toml('llvm-config') or self.get_mk('CFG_LLVM_ROOT')):
575576
continue
576-
if path.endswith(b"jemalloc") and \
577+
if path.endswith('jemalloc') and \
577578
(self.get_toml('jemalloc') or self.get_mk('CFG_JEMALLOC_ROOT')):
578579
continue
579580
submod_path = os.path.join(self.rust_root, path)

0 commit comments

Comments
 (0)