Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5217d94

Browse files
committedMar 10, 2024··
Move msvc libs to core
1 parent 487c2dd commit 5217d94

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
 

‎library/core/src/ffi/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -599,3 +599,13 @@ extern "rust-intrinsic" {
599599
#[rustc_nounwind]
600600
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
601601
}
602+
603+
// Link the MSVC default lib
604+
#[cfg(all(windows, target_env = "msvc"))]
605+
#[link(
606+
name = "/defaultlib:msvcrt",
607+
modifiers = "+verbatim",
608+
cfg(not(target_feature = "crt-static"))
609+
)]
610+
#[link(name = "/defaultlib:libcmt", modifiers = "+verbatim", cfg(target_feature = "crt-static"))]
611+
extern "C" {}

‎library/core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178
#![feature(ip_bits)]
179179
#![feature(is_ascii_octdigit)]
180180
#![feature(isqrt)]
181+
#![feature(link_cfg)]
181182
#![feature(maybe_uninit_uninit_array)]
182183
#![feature(non_null_convenience)]
183184
#![feature(offset_of_enum)]

0 commit comments

Comments
 (0)
Please sign in to comment.