We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e758ed1 commit 05a529cCopy full SHA for 05a529c
src/lib.rs
@@ -727,6 +727,13 @@ impl Build {
727
728
cmd.arg(&src);
729
730
+ // On MSVC skip the CRT by setting the entry point to `main`.
731
+ // This way we don't need to add the default library paths.
732
+ if compiler.is_like_msvc() {
733
+ // Flags from _LINK_ are appended to the linker arguments.
734
+ cmd.env("_LINK_", "-entry:main");
735
+ }
736
+
737
let output = cmd.output()?;
738
let is_supported = output.status.success() && output.stderr.is_empty();
739
0 commit comments