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

Allow mapping a runtime feature to a set of target_features #1311

Merged

Conversation

adamgemmell
Copy link
Contributor

Now that runtime features and target_featuresare logically separate rust-lang/rust#91608, there's a need to map between the two. Usually runtime feature detection short-circuits if a matching target_feature is enabled. However, on aarch64-apple-darwin there's no backup runtime detection yet so we rely purely on this behaviour.

Notably this fixes std::arch::is_aarch64_feature_detected!("fp") returning false on aarch64-apple-darwin and allows for multiple target_features to be specified in the future.

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@Amanieu Amanieu merged commit 8d8801f into rust-lang:master Jul 1, 2022
@adamgemmell adamgemmell deleted the dev/adagem01/rt-targetfeat-mapping branch July 4, 2022 08:45
Amanieu pushed a commit that referenced this pull request Aug 22, 2022
This allows using feature detection macros, without placing a
requirement of enabled stdsimd feature gate from end users.

A follow-up to changes from #1311, which introduced the new macro.
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