diff options
| author | bors <bors@rust-lang.org> | 2025-09-23 18:14:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-23 18:14:16 +0000 |
| commit | 975e6c8fec280816d24fbde6b8dfe19620f2efe6 (patch) | |
| tree | d8bce208a81f7be58cea0cb192fcc1fd7a19a237 /compiler/rustc_codegen_ssa/src | |
| parent | 40560823602064f4c726aea3e15e104449e1a392 (diff) | |
| parent | 8e21b8913533764ed19f13598130cc236b3c238a (diff) | |
| download | rust-975e6c8fec280816d24fbde6b8dfe19620f2efe6.tar.gz rust-975e6c8fec280816d24fbde6b8dfe19620f2efe6.zip | |
Auto merge of #146938 - matthiaskrgr:rollup-y06ggfz, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - rust-lang/rust#146632 (Fix uses of "adaptor") - rust-lang/rust#146731 (test: Use SVG for terminal url test) - rust-lang/rust#146775 (fixes for numerous clippy warnings) - rust-lang/rust#146784 ([win] Use find-msvc-tools instead of cc to find the linker and rc on Windows) - rust-lang/rust#146799 (Fix a dangling reference in `rustc_thread_pool`) - rust-lang/rust#146802 (mbe: Simplifications and refactoring) - rust-lang/rust#146806 (add private module override re-export test) - rust-lang/rust#146827 (Linker-plugin-based LTO: update list of good combinations (inc. beta + nightly)) - rust-lang/rust#146875 (tests/run-make/crate-loading: Rename source files for clarity) - rust-lang/rust#146877 (prevent line number from being copied in chrome) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/linker.rs | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 327f001e1c8..d6c304c1b14 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -9,7 +9,7 @@ use std::path::{Path, PathBuf}; use std::process::{Output, Stdio}; use std::{env, fmt, fs, io, mem, str}; -use cc::windows_registry; +use find_msvc_tools; use itertools::Itertools; use regex::Regex; use rustc_arena::TypedArena; @@ -877,9 +877,9 @@ fn link_natively( // All Microsoft `link.exe` linking ror codes are // four digit numbers in the range 1000 to 9999 inclusive if is_msvc_link_exe && (code < 1000 || code > 9999) { - let is_vs_installed = windows_registry::find_vs_version().is_ok(); + let is_vs_installed = find_msvc_tools::find_vs_version().is_ok(); let has_linker = - windows_registry::find_tool(&sess.target.arch, "link.exe").is_some(); + find_msvc_tools::find_tool(&sess.target.arch, "link.exe").is_some(); sess.dcx().emit_note(errors::LinkExeUnexpectedError); diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index b90be2faa08..624ab1b5084 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -4,7 +4,7 @@ use std::io::prelude::*; use std::path::{Path, PathBuf}; use std::{env, io, iter, mem, str}; -use cc::windows_registry; +use find_msvc_tools; use rustc_hir::def_id::{CrateNum, LOCAL_CRATE}; use rustc_metadata::{ find_native_static_library, try_find_native_dynamic_library, try_find_native_static_library, @@ -53,7 +53,7 @@ pub(crate) fn get_linker<'a>( self_contained: bool, target_cpu: &'a str, ) -> Box<dyn Linker + 'a> { - let msvc_tool = windows_registry::find_tool(&sess.target.arch, "link.exe"); + let msvc_tool = find_msvc_tools::find_tool(&sess.target.arch, "link.exe"); // If our linker looks like a batch script on Windows then to execute this // we'll need to spawn `cmd` explicitly. This is primarily done to handle @@ -117,7 +117,6 @@ pub(crate) fn get_linker<'a>( if sess.target.is_like_msvc && let Some(ref tool) = msvc_tool { - cmd.args(tool.args()); for (k, v) in tool.env() { if k == "PATH" { new_path.extend(env::split_paths(v)); |
