]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_cranelift/example/alloc_example.rs
Auto merge of #82102 - nagisa:nagisa/fix-dwo-name, r=davidtwco
[rust.git] / compiler / rustc_codegen_cranelift / example / alloc_example.rs
index dc2ad4c676e804d99e3f8a9afdd6dee98cb02bde..f59600ebb330cc9e8a3a40444e7199667e928e1a 100644 (file)
@@ -11,7 +11,8 @@
 #[global_allocator]
 static ALLOC: System = System;
 
-#[link(name = "c")]
+#[cfg_attr(unix, link(name = "c"))]
+#[cfg_attr(target_env = "msvc", link(name = "msvcrt"))]
 extern "C" {
     fn puts(s: *const u8) -> i32;
 }