Skip to content

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

Merged
newpavlov merged 1 commit into
RustCrypto:masterfrom
1c7718e7:cpufeatures_fix
Aug 21, 2025
Merged

cpufeatures: use cfg() to detect aarch64 android instead of [target.aarch64-linux-android]#1204
newpavlov merged 1 commit into
RustCrypto:masterfrom
1c7718e7:cpufeatures_fix

Conversation

@1c7718e7

Copy link
Copy Markdown
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.

@newpavlov newpavlov left a comment

Copy link
Copy Markdown
Member

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
@1c7718e7 1c7718e7 deleted the cpufeatures_fix branch April 2, 2026 19:57
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