Rename for_compiler to for_use_by_compiler

This commit is contained in:
Jakub Beránek 2025-07-10 10:10:55 +02:00
parent 5933053aeb
commit 205587b37e
No known key found for this signature in database
GPG key ID: 909CD0D26483516B
3 changed files with 15 additions and 12 deletions

View file

@ -2056,7 +2056,7 @@ impl Step for Assemble {
if builder.config.llvm_bitcode_linker_enabled {
trace!("llvm-bitcode-linker enabled, installing");
let llvm_bitcode_linker = builder.ensure(
crate::core::build_steps::tool::LlvmBitcodeLinker::for_compiler(
crate::core::build_steps::tool::LlvmBitcodeLinker::for_use_by_compiler(
builder,
target_compiler,
),
@ -2259,9 +2259,11 @@ impl Step for Assemble {
copy_codegen_backends_to_sysroot(builder, build_compiler, target_compiler);
if builder.config.lld_enabled {
let lld_wrapper = builder.ensure(
crate::core::build_steps::tool::LldWrapper::for_compiler(builder, target_compiler),
);
let lld_wrapper =
builder.ensure(crate::core::build_steps::tool::LldWrapper::for_use_by_compiler(
builder,
target_compiler,
));
copy_lld_artifacts(builder, lld_wrapper, target_compiler);
}
@ -2289,11 +2291,12 @@ impl Step for Assemble {
// In addition to `rust-lld` also install `wasm-component-ld` when
// is enabled. This is used by the `wasm32-wasip2` target of Rust.
if builder.tool_enabled("wasm-component-ld") {
let wasm_component =
builder.ensure(crate::core::build_steps::tool::WasmComponentLd::for_compiler(
let wasm_component = builder.ensure(
crate::core::build_steps::tool::WasmComponentLd::for_use_by_compiler(
builder,
target_compiler,
));
),
);
builder.copy_link(
&wasm_component.tool_path,
&libdir_bin.join(wasm_component.tool_path.file_name().unwrap()),

View file

@ -2370,8 +2370,8 @@ impl Step for LlvmBitcodeLinker {
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
let target = self.target;
let llbc_linker =
builder.ensure(tool::LlvmBitcodeLinker::for_compiler(builder, self.target_compiler));
let llbc_linker = builder
.ensure(tool::LlvmBitcodeLinker::for_use_by_compiler(builder, self.target_compiler));
let self_contained_bin_dir = format!("lib/rustlib/{}/bin/self-contained", target.triple);

View file

@ -897,7 +897,7 @@ pub struct LldWrapper {
impl LldWrapper {
/// Returns `LldWrapper` that should be **used** by the passed compiler.
pub fn for_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
pub fn for_use_by_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
Self {
build_compiler: get_tool_target_compiler(
builder,
@ -998,7 +998,7 @@ pub struct WasmComponentLd {
impl WasmComponentLd {
/// Returns `WasmComponentLd` that should be **used** by the passed compiler.
pub fn for_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
pub fn for_use_by_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
Self {
build_compiler: get_tool_target_compiler(
builder,
@ -1165,7 +1165,7 @@ pub struct LlvmBitcodeLinker {
impl LlvmBitcodeLinker {
/// Returns `LlvmBitcodeLinker` that should be **used** by the passed compiler.
pub fn for_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
pub fn for_use_by_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
Self {
build_compiler: get_tool_target_compiler(
builder,