Skip to content

Commit

Permalink
Fix bootstrap failing on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
jcotton42 committed May 12, 2020
1 parent d903a9d commit 34b2072
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,16 @@ def format_build_time(duration):
def default_build_triple():
"""Build triple as in LLVM"""
default_encoding = sys.getdefaultencoding()
required = not sys.platform == 'win32'
ostype = require(["uname", "-s"], exit=required).decode(default_encoding)
cputype = require(['uname', '-m'], exit=required).decode(default_encoding)
required = sys.platform != 'win32'
ostype = require(["uname", "-s"], exit=required)
cputype = require(['uname', '-m'], exit=required)

if ostype is None or cputype is None:
return 'x86_64-pc-windows-msvc'

ostype = ostype.decode(default_encoding)
cputype = cputype.decode(default_encoding)

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

0 comments on commit 34b2072

Please sign in to comment.