You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
In a specific case detailed above, cargo tries to compile sha2 with the asm feature while it is not enabled for this target.
Expected : Cargo should respect the conditions for activating a feature in any case. In the specific case detailed above, cargo should compile sha2 without the asm feature.
Steps
Create a lib crate and add dependency to sha2 with asm feature for supported target :
[target.'cfg(all(unix,any(target_arch="x86",target_arch="x86_64")))'.dependencies]
sha2 = { version = "0.8.0", features = ["asm"] }
Compile with target armv7-unknown-linux-gnueabihf" -> it's work
Thanks for the report! This is a well known issue where features of target dependencies are unified across the entire graph, even if the target is not enabled. This is tracked in various other issues (like #1197 and #2524), so I'm going to close in favor of those.
Problem
In a specific case detailed above, cargo tries to compile sha2 with the asm feature while it is not enabled for this target.
Expected : Cargo should respect the conditions for activating a feature in any case. In the specific case detailed above, cargo should compile sha2 without the asm feature.
Steps
scrypt depends on sha2 but without the feature asm : https://github.com/RustCrypto/password-hashing/blob/master/scrypt/Cargo.toml
Possible Solution(s)
Modify the algorithm determining the optional features to be enabled to properly handle this case.
Notes
Output of
cargo version
: cargo 1.36.0 (c4fcfb7 2019-05-15)rustc 1.36.0 (a53f9df32 2019-07-03) toolchain stable
The text was updated successfully, but these errors were encountered: