Skip to content

Commit

Permalink
Fix link name for extern "C" in msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
DianQK committed Dec 1, 2023
1 parent 8d69a1e commit 436d4f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/run-make/no-builtins-lto/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
extern crate no_builtins;
extern crate foo;

#[link(name = "c")]
#[cfg_attr(unix, link(name = "c"))]
#[cfg_attr(target_env = "msvc", link(name = "msvcrt"))]
extern "C" {}

#[start]
Expand Down

0 comments on commit 436d4f6

Please sign in to comment.