Skip to content

Commit 34b2072

Browse files
committedMay 12, 2020
Fix bootstrap failing on win32
1 parent d903a9d commit 34b2072

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,13 +180,16 @@ 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'
189189

190+
ostype = ostype.decode(default_encoding)
191+
cputype = cputype.decode(default_encoding)
192+
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.
192195
ostype_mapper = {

0 commit comments

Comments
 (0)