Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set os.arch to "x86_64" on MacOSX #5556

Merged
merged 1 commit into from
Apr 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions runtime/vm/vmprops.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,19 @@ initializeSystemProperties(J9JavaVM * vm)
}
}

#if defined(OSX) && defined(J9VM_ARCH_X86) && defined(J9VM_ENV_DATA64)
/*
* The reference implementation uses "amd64" to refer to the 64-bit x86
* architecture everywhere except on OSX where the name "x86_64" is
* used: We follow suit.
*/
propValue = "x86_64";
#else /* defined(OSX) && defined(J9VM_ARCH_X86) && defined(J9VM_ENV_DATA64) */
propValue = j9sysinfo_get_CPU_architecture();
if (NULL == propValue) {
propValue = "unknown";
}
#endif /* defined(OSX) && defined(J9VM_ARCH_X86) && defined(J9VM_ENV_DATA64) */
rc = addSystemProperty(vm, "os.arch", propValue, J9SYSPROP_FLAG_WRITEABLE);
if (J9SYSPROP_ERROR_NONE != rc) {
goto fail;
Expand Down