Skip to content

Commit

Permalink
Move msvc libs to core
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Apr 14, 2024
1 parent b1f1039 commit 87e1dd0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions library/core/src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" {}
1 change: 1 addition & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 87e1dd0

Please sign in to comment.