Skip to content

Commit 84f52a7

Browse files
committed
Replace Build with Builder
1 parent 1db9fab commit 84f52a7

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/bootstrap/check.rs

+9-10
Original file line numberDiff line numberDiff line change
@@ -131,22 +131,21 @@ impl Step for CodegenBackend {
131131
}
132132

133133
fn run(self, builder: &Builder) {
134-
let build = builder.build;
135-
let compiler = builder.compiler(0, build.build);
134+
let compiler = builder.compiler(0, builder.config.build);
136135
let target = self.target;
137136
let backend = self.backend;
138137

139138
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "check");
140-
let features = build.rustc_features().to_string();
141-
cargo.arg("--manifest-path").arg(build.src.join("src/librustc_trans/Cargo.toml"));
142-
rustc_cargo_env(build, &mut cargo);
139+
let features = builder.rustc_features().to_string();
140+
cargo.arg("--manifest-path").arg(builder.src.join("src/librustc_trans/Cargo.toml"));
141+
rustc_cargo_env(builder, &mut cargo);
143142

144143
// We won't build LLVM if it's not available, as it shouldn't affect `check`.
145144

146-
let _folder = build.fold_output(|| format!("stage{}-rustc_trans", compiler.stage));
147-
run_cargo(build,
145+
let _folder = builder.fold_output(|| format!("stage{}-rustc_trans", compiler.stage));
146+
run_cargo(builder,
148147
cargo.arg("--features").arg(features),
149-
&codegen_backend_stamp(build, compiler, target, backend),
148+
&codegen_backend_stamp(builder, compiler, target, backend),
150149
true);
151150
}
152151
}
@@ -211,10 +210,10 @@ pub fn librustc_stamp(builder: &Builder, compiler: Compiler, target: Interned<St
211210

212211
/// Cargo's output path for librustc_trans in a given stage, compiled by a particular
213212
/// compiler for the specified target and backend.
214-
fn codegen_backend_stamp(build: &Build,
213+
fn codegen_backend_stamp(builder: &Builder,
215214
compiler: Compiler,
216215
target: Interned<String>,
217216
backend: Interned<String>) -> PathBuf {
218-
build.cargo_out(compiler, Mode::Librustc, target)
217+
builder.cargo_out(compiler, Mode::Librustc, target)
219218
.join(format!(".librustc_trans-{}-check.stamp", backend))
220219
}

src/bootstrap/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ impl Step for CodegenBackend {
667667
codegen_backend.display(),
668668
f.display());
669669
}
670-
let stamp = codegen_backend_stamp(build, compiler, target, backend);
670+
let stamp = codegen_backend_stamp(builder, compiler, target, backend);
671671
let codegen_backend = codegen_backend.to_str().unwrap();
672672
t!(t!(File::create(&stamp)).write_all(codegen_backend.as_bytes()));
673673
}

0 commit comments

Comments
 (0)