Skip to content

Commit 8f8a9e1

Browse files
committed
MSVC: remove =static from Cargo link command
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.
1 parent 95010a5 commit 8f8a9e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/msvc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Build {
9696
"cargo:rustc-link-search=native=",
9797
out_file.parent().expect("empty parent").to_string_lossy(),
9898
"\n",
99-
"cargo:rustc-link-lib=static=",
99+
"cargo:rustc-link-lib=",
100100
out_file
101101
.file_stem()
102102
.expect("empty filename")

0 commit comments

Comments
 (0)