Skip to content

Commit 0000000

Browse files
Fix broken builds on MSVC targets
(See RustCrypto/hashes#315)
1 parent 0000000 commit 0000000

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2018"
66
description = "Make your git commits lucky!"
77
repository = "https://github.com/not-an-aardvark/lucky-commit"
88
license = "MIT"
9+
resolver = "2"
910

1011
[lib]
1112
name = "lucky_commit"
@@ -19,14 +20,15 @@ opencl = ["ocl"]
1920
name = "lucky_commit"
2021
path = "src/bin.rs"
2122

22-
[build-dependencies]
23-
ocl = { version = "0.19", optional = true }
24-
2523
[dependencies]
26-
2724
num_cpus = "1.0"
28-
"sha-1" = { version = "0.9", "default-features" = false, features = ["asm", "compress"] }
2925
ocl = { version = "0.19", optional = true }
3026

27+
# See https://github.com/RustCrypto/hashes/issues/315
28+
[target.'cfg(target_env = "msvc")'.dependencies]
29+
"sha-1" = { version = "0.9", "default-features" = false, features = ["compress"] }
30+
[target.'cfg(not(target_env = "msvc"))'.dependencies]
31+
"sha-1" = { version = "0.9", "default-features" = false, features = ["asm", "compress"] }
32+
3133
[profile.release]
3234
lto = true

0 commit comments

Comments
 (0)