From 186a170200b671d5dada51fd1793c2875fed6ff7 Mon Sep 17 00:00:00 2001 From: Joshua Cotton Date: Wed, 6 May 2020 20:24:40 -0400 Subject: [PATCH 1/2] Fix bootstrap failing on win32 --- src/bootstrap/bootstrap.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 9e56dd3770d46..08ab3a12b5c15 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -180,12 +180,15 @@ 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 = ostype.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. From 7204fe475ca760ddb393e8557b6812666c746cea Mon Sep 17 00:00:00 2001 From: Joshua Cotton Date: Wed, 6 May 2020 20:40:19 -0400 Subject: [PATCH 2/2] Fix embarassing error --- src/bootstrap/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 08ab3a12b5c15..02e9e2b283ac1 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -188,7 +188,7 @@ def default_build_triple(): return 'x86_64-pc-windows-msvc' ostype = ostype.decode(default_encoding) - cputype = 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.