Skip to content

Commit 15df96e

Browse files
committed
Auto merge of rust-lang#133955 - bjorn3:cc_pass_arch_only, r=<try>
Pass the arch rather than full target name to windows_registry::find_tool The full target name can be anything with custom target specs. Passing just the arch wasn't possible before cc 1.2, but is now thanks to rust-lang/cc-rs#1285. try-job: i686-mingw
2 parents 9c707a8 + 5477d85 commit 15df96e

File tree

1 file changed

+2
-6
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+2
-6
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1021,12 +1021,8 @@ fn link_natively(
10211021
&& (code < 1000 || code > 9999)
10221022
{
10231023
let is_vs_installed = windows_registry::find_vs_version().is_ok();
1024-
// FIXME(cc-rs#1265) pass only target arch to find_tool()
1025-
let has_linker = windows_registry::find_tool(
1026-
sess.opts.target_triple.tuple(),
1027-
"link.exe",
1028-
)
1029-
.is_some();
1024+
let has_linker =
1025+
windows_registry::find_tool(&sess.target.arch, "link.exe").is_some();
10301026

10311027
sess.dcx().emit_note(errors::LinkExeUnexpectedError);
10321028
if is_vs_installed && has_linker {

0 commit comments

Comments
 (0)