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 439b75f commit 8127db1Copy full SHA for 8127db1
src/lib.rs
@@ -1357,11 +1357,15 @@ impl Build {
1357
1358
cmd.arg(&src);
1359
1360
- // On MSVC skip the CRT by setting the entry point to `main`.
1361
- // This way we don't need to add the default library paths.
1362
if compiler.is_like_msvc() {
1363
- // Flags from _LINK_ are appended to the linker arguments.
1364
- cmd.env("_LINK_", "-entry:main");
+ // On MSVC we need to make sure the LIB directory is included
+ // so the CRT can be found.
+ for (key, value) in &tool.env {
+ if key == "LIB" {
1365
+ cmd.env("LIB", value);
1366
+ break;
1367
+ }
1368
1369
}
1370
1371
let output = cmd.current_dir(out_dir).output()?;
0 commit comments