Skip to content

Commit b135388

Browse files
committed
Remove Windows dependency on libc
1 parent 1b10e17 commit b135388

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

library/std/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ addr2line = { version = "0.21.0", optional = true, default-features = false }
3333
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
3434
libc = { version = "0.2.153", default-features = false, features = ['rustc-dep-of-std'], public = true }
3535

36-
[target.'cfg(all(windows, target_env = "msvc"))'.dependencies]
37-
libc = { version = "0.2.153", default-features = false }
38-
3936
[target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies]
4037
object = { version = "0.32.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] }
4138

library/std/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ extern crate alloc as alloc_crate;
436436
// so include it here even if it's unused.
437437
#[doc(masked)]
438438
#[allow(unused_extern_crates)]
439+
#[cfg(not(all(windows, target_env = "msvc")))]
439440
extern crate libc;
440441

441442
// We always need an unwinder currently for backtraces

library/std/src/os/raw/tests.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(not(all(windows, target_env = "msvc")))]
2+
13
use crate::any::TypeId;
24

35
macro_rules! ok {

0 commit comments

Comments
 (0)