From 8f8a9e1bee7efc049064f370012ac22395788a11 Mon Sep 17 00:00:00 2001 From: FaultyRAM <316014+FaultyRAM@users.noreply.github.com> Date: Sat, 27 Feb 2021 04:56:34 +1000 Subject: [PATCH] MSVC: remove `=static` from Cargo link command https://github.com/rust-lang/rust/pull/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. --- src/msvc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msvc.rs b/src/msvc.rs index 1f557c2..96aafd9 100644 --- a/src/msvc.rs +++ b/src/msvc.rs @@ -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")