[tools] Allow update.py to run on mac arm machines

Change-Id: I293f493ec10465ec8c2af071aef7aebff44bdf0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241692
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Nicholas Shahan 2022-05-03 20:29:17 +00:00 committed by Commit Bot
parent 651350bc3b
commit f372f8cbbe

View file

@ -75,8 +75,10 @@ def LinksForGitCLFormat():
def main(argv):
arch_id = platform.machine()
# Don't try to download binaries if we're on an arm machine.
if arch_id.startswith('arm') or arch_id.startswith('aarch64'):
# Don't try to download binaries if we're on an arm machine unless it is a
# Mac arm machine because the x64 binaries work using rossetta translation.
if ((arch_id.startswith('arm') and sys.platform != 'darwin') or
arch_id.startswith('aarch64')):
print('Not downloading buildtools binaries for ' + arch_id)
return 0
if sys.platform.startswith('win'):