Commit d4da7ca9 authored by Nico Weber's avatar Nico Weber Committed by LUCI CQ

gclient: Correctly set host_cpu to arm64 on arm macs

platform.machine() is 'arm64' on arm macs, and the `.startswith('arm')`
branch converted that to 'arm' before this CL.

Bug: 1103236,1190880
Change-Id: Idd75a724f059ecd2dd873737e4998fe9bc937e04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2779414
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
parent 743e98ce
......@@ -21,10 +21,10 @@ def HostArch():
host_arch = 'x86'
elif host_arch in ['x86_64', 'amd64']:
host_arch = 'x64'
elif host_arch == 'arm64' or host_arch.startswith('aarch64'):
host_arch = 'arm64'
elif host_arch.startswith('arm'):
host_arch = 'arm'
elif host_arch.startswith('aarch64'):
host_arch = 'arm64'
elif host_arch.startswith('mips64'):
host_arch = 'mips64'
elif host_arch.startswith('mips'):
......
......@@ -37,6 +37,7 @@ class DetectHostArchTest(unittest.TestCase):
('arm', '', [''], 'arm'),
('aarch64', '', [''], 'arm64'),
('aarch64', '', ['32bit'], 'arm'),
('arm64', '', [''], 'arm64'),
('mips64', '', [''], 'mips64'),
('mips', '', [''], 'mips'),
('ppc', '', [''], 'ppc'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment