Skip to content

Commit 978b4fe

Browse files
committed
Auto merge of #14451 - jschwe:fix_gnullvm_implib, r=weihanglo
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.
2 parents cb37786 + 38d2dd6 commit 978b4fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cargo/core/compiler/build_context/target_info.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,10 @@ impl TargetInfo {
389389
crate_type: Some(crate_type.clone()),
390390
should_replace_hyphens: true,
391391
});
392-
} else if target_triple.ends_with("windows-gnu") && suffix == ".dll" {
392+
} else if suffix == ".dll"
393+
&& (target_triple.ends_with("windows-gnu")
394+
|| target_triple.ends_with("windows-gnullvm"))
395+
{
393396
// See https://cygwin.com/cygwin-ug-net/dll.html for more
394397
// information about GNU import libraries.
395398
// LD can link DLL directly, but LLD requires the import library.

0 commit comments

Comments
 (0)