Skip to content

cpufeatures: use cfg() to detect aarch64 android instead of [target.aarch64-linux-android] #1204

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

Merged
merged 1 commit into from
Aug 21, 2025

Conversation

1c7718e7
Copy link
Contributor

I propose that, on aarch64-linux-android, cpufeatures/Cargo.toml should use cfg(all(...)) instead of full target name "aarch64-linux-android", just like the other target-specific deps on libc do.

Motivation for this change is building with a custom rustc target like "aarch64-foobar-linux-android". Cargo/Rustc (and consequently the #[cfg] check in src/aarch64.rs) correctly interpret that as target_arch="aarch64", target_os="android", but the current Cargo.toml fails to include the dependency on libc.

Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

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

Yeah, we should mirror cfgs used in the code.

@newpavlov newpavlov merged commit 87b916e into RustCrypto:master Aug 21, 2025
15 checks passed
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