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

Enable Aarch64 feature detection on all Apple/Darwin targets #1636

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Sep 7, 2024

This was originally added in #1516.

I have tested this in the simulator and on the device I had lying around, a 1st generation iPad Mini (which isn't Aarch64, but shows that the sysctlbyname calls still work even there, even if they return false).

sysctlbyname should be safe to use without causing rejections from the app store, as its usage is documented in:
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics

Also, the standard library will use sysctl soon anyhow, see rust-lang/rust#129019, so if the standard library starts getting rejected by Apple, it won't be entirely stdarch's fault.

A few more references:

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) some time within the next two weeks.

Tested in the simulator and on the device I had lying around, a 1st
generation iPad Mini (which isn't Aarch64, but shows that the
`sysctlbyname` calls still work even there, even if they return false).

`sysctlbyname` _should_ be safe to use without causing rejections from
the app store, as its usage is documented in:
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics

Also, the standard library will use these soon anyhow, so this shouldn't
affect the situation:
rust-lang/rust#129019
@Amanieu Amanieu enabled auto-merge (rebase) September 14, 2024 03:03
@Amanieu Amanieu merged commit b1edbf9 into rust-lang:master Sep 14, 2024
33 checks passed
@madsmtm madsmtm deleted the darwin branch September 14, 2024 03:56
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.

3 participants