8000 Fix macOS Intel architecture detection by MSDarwish2000 · Pull Request #356 · gradle/native-platform · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix macOS Intel architecture detection #356

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MSDarwish2000
Copy link

Newer Intel CPUs Display Name doesn't start with "Intel". For example, it can look like "13th Gen Intel(R) Core(TM) i5-13600K". While newer Intel processors are not officially supported by macOS, those can be present in experimental setups.

A better approach would be finding a different way than depending on display name as even Apple may change their mind about how to structure it.

Copy link
Member
@ov7a ov7a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

The DCO check is failing, please look into that as we can't accept the PR otherwise.


Can you provide more details about why you should change startsWith to contains for Apple? Example strings can help. Covering some sample strings with unit tests would work too.

Can you also provide the string with CPU name from the output for sysctl machdep for the hardware in question?

Signed-off-by: MSDarwish2000 <msdarwish@mayakapps.com>
@MSDarwish2000
Copy link
Author

The DCO check is failing, please look into that as we can't accept the PR otherwise.

I have fixed it. Thank you for the clarification.

Can you provide more details about why you should change startsWith to contains for Apple?

It was more of futureproofing if Apple decided to change it similar to Intel. On the latest commit, I reverted it.

Example strings can help. Covering some sample strings with unit tests would work too.

Can you also provide the string with CPU name from the output for sysctl machdep for the hardware in question?

I have written a unit test for this. Most values are retrieved by searching online on CPU databases. My output is:

% sysctl -n machdep.cpu.brand_string
13th Gen Intel(R) Core(TM) i5-13600K

@MSDarwish2000 MSDarwish2000 requested a review from ov7a May 15, 2025 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0