diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2024-03-10 04:57:45 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2024-04-14 07:11:53 +0000 |
| commit | 87e1dd0dfdd7c4d5e2dba8ce12c619dd2bf73d9c (patch) | |
| tree | 310ee6983e5f73d2beb95a6ec2ac5cc9a618b364 | |
| parent | b1f1039d8bd8ffdda6a58c37f248a247fd9a4e72 (diff) | |
| download | rust-87e1dd0dfdd7c4d5e2dba8ce12c619dd2bf73d9c.tar.gz rust-87e1dd0dfdd7c4d5e2dba8ce12c619dd2bf73d9c.zip | |
Move msvc libs to core
| -rw-r--r-- | library/core/src/ffi/mod.rs | 10 | ||||
| -rw-r--r-- | library/core/src/lib.rs | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/library/core/src/ffi/mod.rs b/library/core/src/ffi/mod.rs index 3627e844222..cbdae2ac766 100644 --- a/library/core/src/ffi/mod.rs +++ b/library/core/src/ffi/mod.rs @@ -609,3 +609,13 @@ extern "rust-intrinsic" { #[rustc_nounwind] fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T; } + +// Link the MSVC default lib +#[cfg(all(windows, target_env = "msvc"))] +#[link( + name = "/defaultlib:msvcrt", + modifiers = "+verbatim", + cfg(not(target_feature = "crt-static")) +)] +#[link(name = "/defaultlib:libcmt", modifiers = "+verbatim", cfg(target_feature = "crt-static"))] +extern "C" {} diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index d2618c8bb2b..154565b6fee 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -178,6 +178,7 @@ #![feature(ip_bits)] #![feature(is_ascii_octdigit)] #![feature(isqrt)] +#![feature(link_cfg)] #![feature(maybe_uninit_uninit_array)] #![feature(non_null_convenience)] #![feature(offset_of_enum)] |
