Skip to content

Commit 67518d0

Browse files
committed
Link to msvcrt if not crt-static
1 parent 06d09ad commit 67518d0

File tree

1 file changed

+2
-1
lines changed
  • tests/run-make/fmt-write-bloat

1 file changed

+2
-1
lines changed

tests/run-make/fmt-write-bloat/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use core::fmt;
66
use core::fmt::Write;
77

88
#[cfg_attr(not(target_env = "msvc"), link(name = "c"))]
9-
#[cfg_attr(target_env = "msvc", link(name = "libcmt"))]
9+
#[cfg_attr(all(target_env = "msvc", target_feature = "crt-static"), link(name = "libcmt"))]
10+
#[cfg_attr(all(target_env = "msvc", not(target_feature = "crt-static")), link(name = "msvcrt"))]
1011
extern "C" {}
1112

1213
struct Dummy;

0 commit comments

Comments
 (0)