diff options
| author | csmoe <csmoe@msn.com> | 2020-05-18 08:46:24 +0800 |
|---|---|---|
| committer | csmoe <csmoe@msn.com> | 2020-05-19 11:02:29 +0800 |
| commit | 2f311b07c8d95b1192e585e983535de89bcbdfaa (patch) | |
| tree | 0e12c995dfdd9352eaa61d542c6f604aca23b456 /src/bootstrap/bootstrap.py | |
| parent | 8841ede3648b5f12284dae850ec065374fd3af46 (diff) | |
| parent | d79f1bd31a1401b5d08096fcdf9a9eb23ddf95df (diff) | |
| download | rust-2f311b07c8d95b1192e585e983535de89bcbdfaa.tar.gz rust-2f311b07c8d95b1192e585e983535de89bcbdfaa.zip | |
Merge branch 'master' into issue-69276
Diffstat (limited to 'src/bootstrap/bootstrap.py')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 9a91f37c5de..b7d0fac5be3 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -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 = { |
