RustCrypto / utils

Utility crates used in RustCrypto
427 stars 123 forks source link

cpufeatures: fix macOS build #1066

Closed tarcieri closed 3 months ago

tarcieri commented 3 months ago

The "sm4" token wasn't being handled. To fix the bleeding, this adds it but hardcoded to disabled.

See build failure here: https://github.com/RustCrypto/utils/actions/runs/8818083683/job/24206057206?pr=1065

   Compiling cpufeatures v0.2.12 (/Users/runner/work/utils/utils/cpufeatures)
error: no rules expected the token `"sm4"`
   --> tests/aarch64.rs:5:51
    |
5   | cpufeatures::new!(armcaps, "aes", "sha2", "sha3", "sm4");
    |                                                   ^^^^^ no rules expected this token in macro call
    |
note: while trying to match `"aes"`
   --> /Users/runner/work/utils/utils/cpufeatures/src/aarch64.rs:107:6
    |
107 |     ("aes") => {
    |      ^^^^^
tarcieri commented 3 months ago

I haven't researched if Apple CPUs support this. I just want the crate to compile again, since it's blocking #1065.