mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
[sdk] Use os.uname() to figure out the host architecture on macOS
platform.machine() might return x86_64 if run under rosetta causing the script to assume that we're building x64 instead of arm64. Change-Id: I169890f41ca71b08f3068da609cbe0579743051b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202770 Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
parent
daf16471cc
commit
a87ea2b474
|
@ -24,7 +24,8 @@ def BuildArchitectures():
|
|||
if BUILD_OS == 'linux':
|
||||
return ['ia32', 'x64', 'arm', 'arm64']
|
||||
elif BUILD_OS == 'macos':
|
||||
return [BUILD_ARCHITECTURE]
|
||||
arch = 'arm64' if 'arm64' == os.uname().machine else 'x64'
|
||||
return [arch]
|
||||
else:
|
||||
return ['ia32', 'x64']
|
||||
|
||||
|
|
Loading…
Reference in a new issue