Skip to content

Commit

Permalink
Fix deprecated use of cc::Build::compile in build.rs (#59)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
  • Loading branch information
NobodyXu committed Aug 7, 2023
1 parent 3515f94 commit b4cf01b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions md5/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ fn main() {
} else {
panic!("Unsupported target architecture");
};
cc::Build::new()
.flag("-c")
.file(asm_path)
.compile("libmd5.a");
cc::Build::new().flag("-c").file(asm_path).compile("md5");
}
2 changes: 1 addition & 1 deletion sha1/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ fn main() {
if target_arch == "aarch64" {
build.flag("-march=armv8-a+crypto");
}
build.flag("-c").file(asm_path).compile("libsha1.a");
build.flag("-c").file(asm_path).compile("sha1");
}
6 changes: 3 additions & 3 deletions sha2/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fn main() {
use std::env;
use std::env;

fn main() {
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
let target_vendor = env::var("CARGO_CFG_TARGET_VENDOR").unwrap_or_default();

Expand All @@ -25,5 +25,5 @@ fn main() {
.file(sha512_path)
.compile("libsha512.a");
}
build256.flag("-c").file(sha256_path).compile("libsha256.a");
build256.flag("-c").file(sha256_path).compile("sha256");
}
2 changes: 1 addition & 1 deletion whirlpool/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ fn main() {
cc::Build::new()
.flag("-c")
.file(asm_path)
.compile("libwhirlpool.a");
.compile("whirlpool");
}

0 comments on commit b4cf01b

Please sign in to comment.