Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,17 @@ impl TargetInfo {
should_replace_hyphens: false,
})
}
else if target_triple.ends_with("windows-gnu")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else if target_triple.ends_with("windows-gnu")
// LD can link DLL directly but LLD requires import library
if target_triple.ends_with("windows-gnu")

&& crate_type.ends_with("dylib")
&& suffix == ".dll"
{
ret.push(FileType {
suffix: ".dll.a".to_string(),
prefix: "lib".to_string(),
flavor: FileFlavor::Normal,
should_replace_hyphens: false,
})
}

// See rust-lang/cargo#4535.
if target_triple.starts_with("wasm32-") && crate_type == "bin" && suffix == ".js" {
Expand Down