Skip to content

Commit 205587b

Browse files
committed
Rename for_compiler to for_use_by_compiler
1 parent 5933053 commit 205587b

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,7 @@ impl Step for Assemble {
20562056
if builder.config.llvm_bitcode_linker_enabled {
20572057
trace!("llvm-bitcode-linker enabled, installing");
20582058
let llvm_bitcode_linker = builder.ensure(
2059-
crate::core::build_steps::tool::LlvmBitcodeLinker::for_compiler(
2059+
crate::core::build_steps::tool::LlvmBitcodeLinker::for_use_by_compiler(
20602060
builder,
20612061
target_compiler,
20622062
),
@@ -2259,9 +2259,11 @@ impl Step for Assemble {
22592259
copy_codegen_backends_to_sysroot(builder, build_compiler, target_compiler);
22602260

22612261
if builder.config.lld_enabled {
2262-
let lld_wrapper = builder.ensure(
2263-
crate::core::build_steps::tool::LldWrapper::for_compiler(builder, target_compiler),
2264-
);
2262+
let lld_wrapper =
2263+
builder.ensure(crate::core::build_steps::tool::LldWrapper::for_use_by_compiler(
2264+
builder,
2265+
target_compiler,
2266+
));
22652267
copy_lld_artifacts(builder, lld_wrapper, target_compiler);
22662268
}
22672269

@@ -2289,11 +2291,12 @@ impl Step for Assemble {
22892291
// In addition to `rust-lld` also install `wasm-component-ld` when
22902292
// is enabled. This is used by the `wasm32-wasip2` target of Rust.
22912293
if builder.tool_enabled("wasm-component-ld") {
2292-
let wasm_component =
2293-
builder.ensure(crate::core::build_steps::tool::WasmComponentLd::for_compiler(
2294+
let wasm_component = builder.ensure(
2295+
crate::core::build_steps::tool::WasmComponentLd::for_use_by_compiler(
22942296
builder,
22952297
target_compiler,
2296-
));
2298+
),
2299+
);
22972300
builder.copy_link(
22982301
&wasm_component.tool_path,
22992302
&libdir_bin.join(wasm_component.tool_path.file_name().unwrap()),

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,8 +2370,8 @@ impl Step for LlvmBitcodeLinker {
23702370
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
23712371
let target = self.target;
23722372

2373-
let llbc_linker =
2374-
builder.ensure(tool::LlvmBitcodeLinker::for_compiler(builder, self.target_compiler));
2373+
let llbc_linker = builder
2374+
.ensure(tool::LlvmBitcodeLinker::for_use_by_compiler(builder, self.target_compiler));
23752375

23762376
let self_contained_bin_dir = format!("lib/rustlib/{}/bin/self-contained", target.triple);
23772377

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ pub struct LldWrapper {
897897

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

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

11661166
impl LlvmBitcodeLinker {
11671167
/// Returns `LlvmBitcodeLinker` that should be **used** by the passed compiler.
1168-
pub fn for_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
1168+
pub fn for_use_by_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self {
11691169
Self {
11701170
build_compiler: get_tool_target_compiler(
11711171
builder,

0 commit comments

Comments
 (0)