Skip to content

Commit

Permalink
MSVC: remove =static from Cargo link command
Browse files Browse the repository at this point in the history
rust-lang/rust#72785 introduced a breaking
change for MSVC targets that causes linking against a static library to
fail when using `cargo:rustc-link-lib=static`. As a workaround, remove
`=static` from the MSVC code until Rust allows disabling whole archive
linking.
  • Loading branch information
FaultyRAM committed Feb 26, 2021
1 parent 95010a5 commit 8f8a9e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/msvc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl Build {
"cargo:rustc-link-search=native=",
out_file.parent().expect("empty parent").to_string_lossy(),
"\n",
"cargo:rustc-link-lib=static=",
"cargo:rustc-link-lib=",
out_file
.file_stem()
.expect("empty filename")
Expand Down

0 comments on commit 8f8a9e1

Please sign in to comment.