Repository navigation
Report arm64 instead of aarch64 on macOS with the Java POSIX backend - #1415
Merged
Merged
Conversation
Fixes oracle#1389. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Mathieu Dupuy <deronnax@gmail.com>
msimacek
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1389.
With the Java POSIX backend,
unameis emulated and takes the machine name from the Javaos.archproperty, which isaarch64on Apple silicon. CPython reportsarm64there, and macOS wheel platform tags use that name too. The native POSIX backend, which thegraalpylauncher uses by default, already reportsarm64.Changes
PythonUtils.getPythonArch(), used by the emulateduname, now mapsaarch64toarm64on Darwin. Linux still reportsaarch64.os.uname().machine,platform.machine()andsysconfig.get_platform()with the Java backend.sys.implementation._multiarchis unchanged.test_posix'stest_unamenow checks the machine name on macOS.Validation
Tested locally on an arm64 MacBook.
--python.PosixModuleBackend=javareportsaarch64/macosx-11.0-aarch64, while the native backend reportsarm64/macosx-11.0-arm64.mx python-jvmbuild with this change: both backends reportarm64/macosx-11.0-arm64.mx graalpytest graalpython/com.oracle.graal.python.test/src/tests/test_posix.py(native backend): 81 passed, 11 skipped.test_unamerun separately on the Java backend: passed.Model: Claude Sonnet 5.5, effort: medium