Skip to content

Commit

Permalink
cargo: Add cc to build dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Oct 18, 2024
1 parent a7fb4e1 commit f0b0f75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ keywords = ["syscall", "linux"]
categories = ["os", "no-std", "external-ffi-bindings"]
rust-version = "1.63.0"

[target.'cfg(not(any(target_arch = "arm", target_arch = "aarch64", target_arch = "riscv64", target_arch = "x86", target_arch = "x86_64")))'.build-dependencies]
cc = "1.1.21"
[build-dependencies]
cc = "1.1"

[features]
default = ["std"]
Expand Down
8 changes: 0 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,7 @@ fn build_syscall(rustc_toolchain: &str, target_arch: &str) {
{
println!("cargo:rustc-cfg=nc_has_asm");
} else {
#[allow(unused_variables)]
let syscall_file = format!("src/syscalls/syscall_{}.c", target_arch);
#[cfg(not(any(
target_arch = "aarch64",
target_arch = "arm",
target_arch = "riscv64",
target_arch = "x86",
target_arch = "x86_64"
)))]
cc::Build::new().file(syscall_file).compile("syscall");
}
}
Expand Down

0 comments on commit f0b0f75

Please sign in to comment.