| bootstrap.py parses the output of `uname -smp`, expecting it to |
| contain 3 parts separated by whitespace. On at least some of our |
| machines, there are more than 3 words, e.g. the output might be "Linux |
| x86_64 AMD EPYC 7B12". To handle this, modify the parsing to split the |
| first two parts on whitespace as before, and treat everything after |
| that as the third part. |
| |
| diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py |
| index 58d1926..d678fd9 100644 |
| --- a/src/bootstrap/bootstrap.py |
| +++ b/src/bootstrap/bootstrap.py |
| @@ -256,7 +256,7 @@ def default_build_triple(verbose): |
| if uname is None: |
| return 'x86_64-pc-windows-msvc' |
| |
| - kernel, cputype, processor = uname.decode(default_encoding).split() |
| + kernel, cputype, processor = uname.decode(default_encoding).split(maxsplit=2) |
| |
| # 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. |