Skip to content

Commit 186a170

Browse files
committed
Fix bootstrap failing on win32
1 parent 1836e3b commit 186a170

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bootstrap/bootstrap.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,15 @@ def format_build_time(duration):
180180
def default_build_triple():
181181
"""Build triple as in LLVM"""
182182
default_encoding = sys.getdefaultencoding()
183-
required = not sys.platform == 'win32'
184-
ostype = require(["uname", "-s"], exit=required).decode(default_encoding)
185-
cputype = require(['uname', '-m'], exit=required).decode(default_encoding)
183+
required = sys.platform != 'win32'
184+
ostype = require(["uname", "-s"], exit=required)
185+
cputype = require(['uname', '-m'], exit=required)
186186

187187
if ostype is None or cputype is None:
188188
return 'x86_64-pc-windows-msvc'
189+
190+
ostype = ostype.decode(default_encoding)
191+
cputype = ostype.decode(default_encoding)
189192

190193
# The goal here is to come up with the same triple as LLVM would,
191194
# at least for the subset of platforms we're willing to target.

0 commit comments

Comments
 (0)