diff options
| author | bors <bors@rust-lang.org> | 2025-01-04 15:42:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-01-04 15:42:31 +0000 |
| commit | 2a8af4f7c8262a90b886bc063fe0c271d2b51a45 (patch) | |
| tree | b846ed490ff46c9ddb804368d91ccff8a614580b /compiler/rustc_codegen_ssa/src/back/link.rs | |
| parent | fd127a3a84e3874979aa6f52acfb184e3ecce210 (diff) | |
| parent | 5e66869c65209b5555d78e9f96dab831ebc325af (diff) | |
| download | rust-2a8af4f7c8262a90b886bc063fe0c271d2b51a45.tar.gz rust-2a8af4f7c8262a90b886bc063fe0c271d2b51a45.zip | |
Auto merge of #133955 - bjorn3:cc_pass_arch_only, r=ChrisDenton
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 https://github.com/rust-lang/cc-rs/pull/1285. try-job: i686-msvc
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back/link.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index e2081ad7563..2587d6dfdc4 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1008,12 +1008,8 @@ fn link_natively( && (code < 1000 || code > 9999) { let is_vs_installed = windows_registry::find_vs_version().is_ok(); - // FIXME(cc-rs#1265) pass only target arch to find_tool() - let has_linker = windows_registry::find_tool( - sess.opts.target_triple.tuple(), - "link.exe", - ) - .is_some(); + let has_linker = + windows_registry::find_tool(&sess.target.arch, "link.exe").is_some(); sess.dcx().emit_note(errors::LinkExeUnexpectedError); if is_vs_installed && has_linker { |
