diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-04-17 23:11:39 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2024-05-20 11:13:31 -0400 |
| commit | aa31281f2d8cb2b31e0396ad2dd7e3e8976ae25d (patch) | |
| tree | 8fd4710aa50f13e3146f4cd0c61e66b357c29f84 | |
| parent | 30379f9bcc8cc31610784024c7a1f1d4fb98f4c5 (diff) | |
| download | rust-aa31281f2d8cb2b31e0396ad2dd7e3e8976ae25d.tar.gz rust-aa31281f2d8cb2b31e0396ad2dd7e3e8976ae25d.zip | |
Remove Windows dependency on libc
| -rw-r--r-- | library/std/Cargo.toml | 3 | ||||
| -rw-r--r-- | library/std/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/std/src/os/raw/tests.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 52729ba1f84..a77d438e1f1 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -33,9 +33,6 @@ addr2line = { version = "0.21.0", optional = true, default-features = false } [target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies] libc = { version = "0.2.153", default-features = false, features = ['rustc-dep-of-std'], public = true } -[target.'cfg(all(windows, target_env = "msvc"))'.dependencies] -libc = { version = "0.2.153", default-features = false } - [target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies] object = { version = "0.32.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] } diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 27b46b46204..949c543a264 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -435,6 +435,7 @@ extern crate alloc as alloc_crate; // so include it here even if it's unused. #[doc(masked)] #[allow(unused_extern_crates)] +#[cfg(not(all(windows, target_env = "msvc")))] extern crate libc; // We always need an unwinder currently for backtraces diff --git a/library/std/src/os/raw/tests.rs b/library/std/src/os/raw/tests.rs index e7bb7d7e73e..f41a22e1bcc 100644 --- a/library/std/src/os/raw/tests.rs +++ b/library/std/src/os/raw/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(all(windows, target_env = "msvc")))] + use crate::any::TypeId; macro_rules! ok { |
