Skip to content

Commit 03c2a10

Browse files
committed
Auto merge of rust-lang#119373 - Kobzol:missing-tools-bootstrap, r=onur-ozkan
Remove usage of deprecated `missing-tools` bootstrap flag This PR removes the usage of `--enable-missing-tools` in CI, as this config option is no longer used. It also removes `dist.missing-tools` config completely. Let me know which commits should I remove (if any). Fixes: rust-lang#79249 r? `@onur-ozkan`
2 parents fb5ed72 + fdeb8c5 commit 03c2a10

File tree

9 files changed

+98
-134
lines changed

9 files changed

+98
-134
lines changed

src/bootstrap/configure.py

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def v(*args):
5555
o("full-tools", None, "enable all tools")
5656
o("lld", "rust.lld", "build lld")
5757
o("clang", "llvm.clang", "build clang")
58-
o("missing-tools", "dist.missing-tools", "allow failures when building tools")
5958
o("use-libcxx", "llvm.use-libcxx", "build LLVM with libc++")
6059
o("control-flow-guard", "rust.control-flow-guard", "Enable Control Flow Guard")
6160
o("patch-binaries-for-nix", "build.patch-binaries-for-nix", "whether patch binaries for usage with Nix toolchains")

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

+13-23
Original file line numberDiff line numberDiff line change
@@ -1110,9 +1110,7 @@ impl Step for Rls {
11101110
let compiler = self.compiler;
11111111
let target = self.target;
11121112

1113-
let rls = builder
1114-
.ensure(tool::Rls { compiler, target, extra_features: Vec::new() })
1115-
.expect("rls expected to build");
1113+
let rls = builder.ensure(tool::Rls { compiler, target, extra_features: Vec::new() });
11161114

11171115
let mut tarball = Tarball::new(builder, "rls", &target.triple);
11181116
tarball.set_overlay(OverlayKind::RLS);
@@ -1154,9 +1152,7 @@ impl Step for RustAnalyzer {
11541152
let compiler = self.compiler;
11551153
let target = self.target;
11561154

1157-
let rust_analyzer = builder
1158-
.ensure(tool::RustAnalyzer { compiler, target })
1159-
.expect("rust-analyzer always builds");
1155+
let rust_analyzer = builder.ensure(tool::RustAnalyzer { compiler, target });
11601156

11611157
let mut tarball = Tarball::new(builder, "rust-analyzer", &target.triple);
11621158
tarball.set_overlay(OverlayKind::RustAnalyzer);
@@ -1201,12 +1197,9 @@ impl Step for Clippy {
12011197
// Prepare the image directory
12021198
// We expect clippy to build, because we've exited this step above if tool
12031199
// state for clippy isn't testing.
1204-
let clippy = builder
1205-
.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() })
1206-
.expect("clippy expected to build - essential tool");
1207-
let cargoclippy = builder
1208-
.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() })
1209-
.expect("clippy expected to build - essential tool");
1200+
let clippy = builder.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() });
1201+
let cargoclippy =
1202+
builder.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() });
12101203

12111204
let mut tarball = Tarball::new(builder, "clippy", &target.triple);
12121205
tarball.set_overlay(OverlayKind::Clippy);
@@ -1255,9 +1248,9 @@ impl Step for Miri {
12551248
let compiler = self.compiler;
12561249
let target = self.target;
12571250

1258-
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() })?;
1251+
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() });
12591252
let cargomiri =
1260-
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() })?;
1253+
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() });
12611254

12621255
let mut tarball = Tarball::new(builder, "miri", &target.triple);
12631256
tarball.set_overlay(OverlayKind::Miri);
@@ -1396,12 +1389,10 @@ impl Step for Rustfmt {
13961389
let compiler = self.compiler;
13971390
let target = self.target;
13981391

1399-
let rustfmt = builder
1400-
.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() })
1401-
.expect("rustfmt expected to build - essential tool");
1402-
let cargofmt = builder
1403-
.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() })
1404-
.expect("cargo fmt expected to build - essential tool");
1392+
let rustfmt =
1393+
builder.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() });
1394+
let cargofmt =
1395+
builder.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() });
14051396
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
14061397
tarball.set_overlay(OverlayKind::Rustfmt);
14071398
tarball.is_preview(true);
@@ -1455,9 +1446,8 @@ impl Step for RustDemangler {
14551446
return None;
14561447
}
14571448

1458-
let rust_demangler = builder
1459-
.ensure(tool::RustDemangler { compiler, target, extra_features: Vec::new() })
1460-
.expect("rust-demangler expected to build - in-tree tool");
1449+
let rust_demangler =
1450+
builder.ensure(tool::RustDemangler { compiler, target, extra_features: Vec::new() });
14611451

14621452
// Prepare the image directory
14631453
let mut tarball = Tarball::new(builder, "rust-demangler", &target.triple);

src/bootstrap/src/core/build_steps/run.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,8 @@ impl Step for Miri {
148148
let target = self.target;
149149
let compiler = builder.compiler(stage, host);
150150

151-
let miri = builder
152-
.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() })
153-
.expect("in-tree tool");
151+
let miri =
152+
builder.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() });
154153
let miri_sysroot = test::Miri::build_miri_sysroot(builder, compiler, &miri, target);
155154

156155
// # Run miri.

src/bootstrap/src/core/build_steps/test.rs

+19-22
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,7 @@ impl Step for Rustfmt {
427427
let host = self.host;
428428
let compiler = builder.compiler(stage, host);
429429

430-
builder
431-
.ensure(tool::Rustfmt { compiler, target: self.host, extra_features: Vec::new() })
432-
.expect("in-tree tool");
430+
builder.ensure(tool::Rustfmt { compiler, target: self.host, extra_features: Vec::new() });
433431

434432
let mut cargo = tool::prepare_tool_cargo(
435433
builder,
@@ -476,9 +474,11 @@ impl Step for RustDemangler {
476474
let host = self.host;
477475
let compiler = builder.compiler(stage, host);
478476

479-
let rust_demangler = builder
480-
.ensure(tool::RustDemangler { compiler, target: self.host, extra_features: Vec::new() })
481-
.expect("in-tree tool");
477+
let rust_demangler = builder.ensure(tool::RustDemangler {
478+
compiler,
479+
target: self.host,
480+
extra_features: Vec::new(),
481+
});
482482
let mut cargo = tool::prepare_tool_cargo(
483483
builder,
484484
compiler,
@@ -609,12 +609,13 @@ impl Step for Miri {
609609
// Except if we are at stage 2, the bootstrap loop is complete and we can stick with our current stage.
610610
let compiler_std = builder.compiler(if stage < 2 { stage + 1 } else { stage }, host);
611611

612-
let miri = builder
613-
.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() })
614-
.expect("in-tree tool");
615-
let _cargo_miri = builder
616-
.ensure(tool::CargoMiri { compiler, target: self.host, extra_features: Vec::new() })
617-
.expect("in-tree tool");
612+
let miri =
613+
builder.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() });
614+
let _cargo_miri = builder.ensure(tool::CargoMiri {
615+
compiler,
616+
target: self.host,
617+
extra_features: Vec::new(),
618+
});
618619
// The stdlib we need might be at a different stage. And just asking for the
619620
// sysroot does not seem to populate it, so we do that first.
620621
builder.ensure(compile::Std::new(compiler_std, host));
@@ -788,9 +789,7 @@ impl Step for Clippy {
788789
let host = self.host;
789790
let compiler = builder.compiler(stage, host);
790791

791-
builder
792-
.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() })
793-
.expect("in-tree tool");
792+
builder.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() });
794793
let mut cargo = tool::prepare_tool_cargo(
795794
builder,
796795
compiler,
@@ -1668,13 +1667,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
16681667
if mode == "coverage-run" {
16691668
// The demangler doesn't need the current compiler, so we can avoid
16701669
// unnecessary rebuilds by using the bootstrap compiler instead.
1671-
let rust_demangler = builder
1672-
.ensure(tool::RustDemangler {
1673-
compiler: compiler.with_stage(0),
1674-
target: compiler.host,
1675-
extra_features: Vec::new(),
1676-
})
1677-
.expect("in-tree tool");
1670+
let rust_demangler = builder.ensure(tool::RustDemangler {
1671+
compiler: compiler.with_stage(0),
1672+
target: compiler.host,
1673+
extra_features: Vec::new(),
1674+
});
16781675
cmd.arg("--rust-demangler-path").arg(rust_demangler);
16791676
}
16801677

0 commit comments

Comments
 (0)