Skip to content

Commit

Permalink
Auto merge of #14451 - jschwe:fix_gnullvm_implib, r=weihanglo
Browse files Browse the repository at this point in the history
uplift windows gnullvm import libraries

Same changes as #8141, but for gnullvm.
gnullvm does not seem to be tested in CI, so tests were not adjusted.

### What does this PR try to resolve?

The `implib` for [gnullvm](https://doc.rust-lang.org/rustc/platform-support/pc-windows-gnullvm.html) targets should end up at the same location as for `gnu` targets.

### Background

I'm not a windows developer, so I may be wrong, but I believe the implib artifacts for gnullvm should be needed in the same way as for the normal windows-gnu target. In my downstream code, I need to know the location of the implib artifact, and would prefer for the location to be the same for both gnullvm and normal gnu.
  • Loading branch information
bors committed Sep 5, 2024
2 parents cb37786 + 38d2dd6 commit 978b4fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 978b4fe

Please sign in to comment.