Skip to content

Commit ca3d1c2

Browse files
authored
cpufeatures: don't link std when linking libc (#1142)
On AArch64, we link the `libc` crate to provide access to system call wrappers which can query available CPU features from the kernel, since those calls are protected on that CPU architecture. We don't need `std` though, and it seems we're inadvertently linking it on Linux, Android, and macOS.
1 parent 1517021 commit ca3d1c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpufeatures/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ edition = "2018"
1515
readme = "README.md"
1616

1717
[target.'cfg(all(target_arch = "aarch64", target_vendor = "apple"))'.dependencies]
18-
libc = "0.2.155"
18+
libc = { version = "0.2.155", default-features = false }
1919

2020
[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.dependencies]
21-
libc = "0.2.155"
21+
libc = { version = "0.2.155", default-features = false }
2222

2323
[target.'cfg(all(target_arch = "loongarch64", target_os = "linux"))'.dependencies]
24-
libc = "0.2.155"
24+
libc = { version = "0.2.155", default-features = false }
2525

2626
[target.aarch64-linux-android.dependencies]
27-
libc = "0.2.155"
27+
libc = { version = "0.2.155", default-features = false }

0 commit comments

Comments
 (0)