diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 39e0515de36..f36fc173bcc 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -389,7 +389,10 @@ impl TargetInfo { crate_type: Some(crate_type.clone()), should_replace_hyphens: true, }); - } else if target_triple.ends_with("windows-gnu") && suffix == ".dll" { + } else if suffix == ".dll" + && (target_triple.ends_with("windows-gnu") + || target_triple.ends_with("windows-gnullvm")) + { // See https://cygwin.com/cygwin-ug-net/dll.html for more // information about GNU import libraries. // LD can link DLL directly, but LLD requires the import library.