about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-05-19 14:16:24 -0600
committerGitHub <noreply@github.com>2017-05-19 14:16:24 -0600
commit7812adf1ee3b410ca367958f0d7275992982b031 (patch)
tree6e7a3005fefb2a3b45935c5180f101c9ac0108ba
parent3fb27a0a9eb2e9bed679f093505657ee560e3df2 (diff)
parentc5163aadc5e599d45e9022a3d8df4815b6066bdc (diff)
downloadrust-7812adf1ee3b410ca367958f0d7275992982b031.tar.gz
rust-7812adf1ee3b410ca367958f0d7275992982b031.zip
Rollup merge of #42089 - nagisa:xpy-broke-on-py3-again⁈, r=alexcrichton
Fix x.py

Fixes https://github.com/rust-lang/rust/issues/42085
-rw-r--r--src/bootstrap/bootstrap.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index e15304a7e6e..bfba1a0dede 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -398,13 +398,14 @@ class RustBuild(object):
             sys.exit(ret)
 
     def output(self, args, env=None, cwd=None):
+        default_encoding = sys.getdefaultencoding()
         proc = subprocess.Popen(args, stdout=subprocess.PIPE, env=env, cwd=cwd)
         (out, err) = proc.communicate()
         ret = proc.wait()
         if ret != 0:
             print(out)
             sys.exit(ret)
-        return out
+        return out.decode(default_encoding)
 
     def build_triple(self):
         default_encoding = sys.getdefaultencoding()
@@ -570,10 +571,10 @@ class RustBuild(object):
 
         for submod in submodules:
             path, status = submod
-            if path.endswith(b"llvm") and \
+            if path.endswith('llvm') and \
                 (self.get_toml('llvm-config') or self.get_mk('CFG_LLVM_ROOT')):
                 continue
-            if path.endswith(b"jemalloc") and \
+            if path.endswith('jemalloc') and \
                 (self.get_toml('jemalloc') or self.get_mk('CFG_JEMALLOC_ROOT')):
                 continue
             submod_path = os.path.join(self.rust_root, path)