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

sha-1: fix compilation on ARM32 with asm feature (and other unsupported archs) #388

Merged
merged 2 commits into from Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions md5/Cargo.toml
Expand Up @@ -16,6 +16,8 @@ name = "md5"

[dependencies]
digest = "0.10.3"

[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
md5-asm = { version = "0.5", optional = true }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions md5/src/lib.rs
Expand Up @@ -31,10 +31,10 @@
)]
#![warn(missing_docs, rust_2018_idioms)]

#[cfg(feature = "asm")]
#[cfg(all(feature = "asm", any(target_arch = "x86", target_arch = "x86_64")))]
extern crate md5_asm as compress;

#[cfg(not(feature = "asm"))]
#[cfg(not(all(feature = "asm", any(target_arch = "x86", target_arch = "x86_64"))))]
mod compress;

pub use digest::{self, Digest};
Expand Down
2 changes: 1 addition & 1 deletion sha1/Cargo.toml
Expand Up @@ -15,10 +15,10 @@ categories = ["cryptography", "no-std"]
[dependencies]
digest = "0.10.3"
cfg-if = "1.0"
sha1-asm = { version = "0.5", optional = true }

[target.'cfg(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64"))'.dependencies]
cpufeatures = "0.2"
sha1-asm = { version = "0.5", optional = true }

[dev-dependencies]
digest = { version = "0.10.3", features = ["dev"] }
Expand Down
2 changes: 1 addition & 1 deletion sha2/Cargo.toml
Expand Up @@ -17,10 +17,10 @@ categories = ["cryptography", "no-std"]
[dependencies]
digest = "0.10.3"
cfg-if = "1.0"
sha2-asm = { version = "0.6.1", optional = true }

[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86"))'.dependencies]
cpufeatures = "0.2"
sha2-asm = { version = "0.6.1", optional = true }

[dev-dependencies]
digest = { version = "0.10.3", features = ["dev"] }
Expand Down
2 changes: 2 additions & 0 deletions whirlpool/Cargo.toml
Expand Up @@ -13,6 +13,8 @@ categories = ["cryptography", "no-std"]

[dependencies]
digest = "0.10.3"

[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
whirlpool-asm = { version = "0.6", optional = true}

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions whirlpool/src/lib.rs
Expand Up @@ -45,10 +45,10 @@

pub use digest::{self, Digest};

#[cfg(not(feature = "asm"))]
#[cfg(not(all(feature = "asm", any(target_arch = "x86", target_arch = "x86_64"))))]
mod compress;

#[cfg(feature = "asm")]
#[cfg(all(feature = "asm", any(target_arch = "x86", target_arch = "x86_64")))]
use whirlpool_asm as compress;

use compress::compress;
Expand Down