Skip to content

Commit edfef42

Browse files
committed
ensure compiler existance of tools on the dist step
Signed-off-by: onur-ozkan <[email protected]>
1 parent 58c2dd9 commit edfef42

File tree

1 file changed

+18
-5
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+18
-5
lines changed

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

+18-5
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,13 @@ impl Step for Rustc {
421421
builder.install(&rustdoc, &image.join("bin"), FileType::Executable);
422422
}
423423

424+
let ra_proc_macro_srv_compiler =
425+
builder.compiler_for(compiler.stage, builder.config.build, compiler.host);
426+
builder.ensure(compile::Rustc::new(ra_proc_macro_srv_compiler, compiler.host));
427+
424428
if let Some(ra_proc_macro_srv) = builder.ensure_if_default(
425429
tool::RustAnalyzerProcMacroSrv {
426-
compiler: builder.compiler_for(
427-
compiler.stage,
428-
builder.config.build,
429-
compiler.host,
430-
),
430+
compiler: ra_proc_macro_srv_compiler,
431431
target: compiler.host,
432432
},
433433
builder.kind,
@@ -1177,6 +1177,8 @@ impl Step for Cargo {
11771177
let compiler = self.compiler;
11781178
let target = self.target;
11791179

1180+
builder.ensure(compile::Rustc::new(compiler, target));
1181+
11801182
let cargo = builder.ensure(tool::Cargo { compiler, target });
11811183
let src = builder.src.join("src/tools/cargo");
11821184
let etc = src.join("src/etc");
@@ -1231,6 +1233,8 @@ impl Step for RustAnalyzer {
12311233
let compiler = self.compiler;
12321234
let target = self.target;
12331235

1236+
builder.ensure(compile::Rustc::new(compiler, target));
1237+
12341238
let rust_analyzer = builder.ensure(tool::RustAnalyzer { compiler, target });
12351239

12361240
let mut tarball = Tarball::new(builder, "rust-analyzer", &target.triple);
@@ -1273,6 +1277,8 @@ impl Step for Clippy {
12731277
let compiler = self.compiler;
12741278
let target = self.target;
12751279

1280+
builder.ensure(compile::Rustc::new(compiler, target));
1281+
12761282
// Prepare the image directory
12771283
// We expect clippy to build, because we've exited this step above if tool
12781284
// state for clippy isn't testing.
@@ -1323,9 +1329,12 @@ impl Step for Miri {
13231329
if !builder.build.unstable_features() {
13241330
return None;
13251331
}
1332+
13261333
let compiler = self.compiler;
13271334
let target = self.target;
13281335

1336+
builder.ensure(compile::Rustc::new(compiler, target));
1337+
13291338
let miri = builder.ensure(tool::Miri { compiler, target });
13301339
let cargomiri = builder.ensure(tool::CargoMiri { compiler, target });
13311340

@@ -1462,6 +1471,8 @@ impl Step for Rustfmt {
14621471
let compiler = self.compiler;
14631472
let target = self.target;
14641473

1474+
builder.ensure(compile::Rustc::new(compiler, target));
1475+
14651476
let rustfmt = builder.ensure(tool::Rustfmt { compiler, target });
14661477
let cargofmt = builder.ensure(tool::Cargofmt { compiler, target });
14671478
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
@@ -2327,6 +2338,8 @@ impl Step for LlvmBitcodeLinker {
23272338
let compiler = self.compiler;
23282339
let target = self.target;
23292340

2341+
builder.ensure(compile::Rustc::new(compiler, target));
2342+
23302343
let llbc_linker =
23312344
builder.ensure(tool::LlvmBitcodeLinker { compiler, target, extra_features: vec![] });
23322345

0 commit comments

Comments
 (0)