Skip to content

Commit 8e63c0c

Browse files
committed
Support arm64 macOS via Rosetta2
1 parent 77c36f1 commit 8e63c0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mx.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3853,6 +3853,11 @@ def get_arch():
38533853
except OSError:
38543854
# sysctl is not available
38553855
pass
3856+
if machine == 'arm64' and is_darwin():
3857+
# temporary workaround for arm64 (aarch64) based macOS systems (e.g. M1 processor)
3858+
# some libraries don't have a macOS arm64 build yet (e.g. ASYNC_PROFILER),
3859+
# but they can run as amd64 with Rosetta2
3860+
return 'amd64'
38563861
abort('unknown or unsupported architecture: os=' + get_os() + ', machine=' + machine)
38573862

38583863
mx_subst.results_substitutions.register_no_arg('arch', get_arch)

0 commit comments

Comments
 (0)