Skip to content

Commit 436d4f6

Browse files
committed
Fix link name for extern "C" in msvc
1 parent 8d69a1e commit 436d4f6

File tree

1 file changed

+2
-1
lines changed
  • tests/run-make/no-builtins-lto

1 file changed

+2
-1
lines changed

tests/run-make/no-builtins-lto/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
extern crate no_builtins;
77
extern crate foo;
88

9-
#[link(name = "c")]
9+
#[cfg_attr(unix, link(name = "c"))]
10+
#[cfg_attr(target_env = "msvc", link(name = "msvcrt"))]
1011
extern "C" {}
1112

1213
#[start]

0 commit comments

Comments
 (0)