Skip to content

Commit

Permalink
Auto merge of rust-lang#119373 - Kobzol:missing-tools-bootstrap, r=on…
Browse files Browse the repository at this point in the history
…ur-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`
  • Loading branch information
bors committed Dec 29, 2023
2 parents dc450f9 + fdeb8c5 commit 29abb90
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 134 deletions.
1 change: 0 additions & 1 deletion src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def v(*args):
o("full-tools", None, "enable all tools")
o("lld", "rust.lld", "build lld")
o("clang", "llvm.clang", "build clang")
o("missing-tools", "dist.missing-tools", "allow failures when building tools")
o("use-libcxx", "llvm.use-libcxx", "build LLVM with libc++")
o("control-flow-guard", "rust.control-flow-guard", "Enable Control Flow Guard")
o("patch-binaries-for-nix", "build.patch-binaries-for-nix", "whether patch binaries for usage with Nix toolchains")
Expand Down
36 changes: 13 additions & 23 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,7 @@ impl Step for Rls {
let compiler = self.compiler;
let target = self.target;

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

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

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

let mut tarball = Tarball::new(builder, "rust-analyzer", &target.triple);
tarball.set_overlay(OverlayKind::RustAnalyzer);
Expand Down Expand Up @@ -1201,12 +1197,9 @@ impl Step for Clippy {
// Prepare the image directory
// We expect clippy to build, because we've exited this step above if tool
// state for clippy isn't testing.
let clippy = builder
.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() })
.expect("clippy expected to build - essential tool");
let cargoclippy = builder
.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() })
.expect("clippy expected to build - essential tool");
let clippy = builder.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() });
let cargoclippy =
builder.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() });

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

let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() })?;
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() });
let cargomiri =
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() })?;
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() });

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

let rustfmt = builder
.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() })
.expect("rustfmt expected to build - essential tool");
let cargofmt = builder
.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() })
.expect("cargo fmt expected to build - essential tool");
let rustfmt =
builder.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() });
let cargofmt =
builder.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() });
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
tarball.set_overlay(OverlayKind::Rustfmt);
tarball.is_preview(true);
Expand Down Expand Up @@ -1455,9 +1446,8 @@ impl Step for RustDemangler {
return None;
}

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

// Prepare the image directory
let mut tarball = Tarball::new(builder, "rust-demangler", &target.triple);
Expand Down
5 changes: 2 additions & 3 deletions src/bootstrap/src/core/build_steps/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ impl Step for Miri {
let target = self.target;
let compiler = builder.compiler(stage, host);

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

// # Run miri.
Expand Down
41 changes: 19 additions & 22 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,7 @@ impl Step for Rustfmt {
let host = self.host;
let compiler = builder.compiler(stage, host);

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

let mut cargo = tool::prepare_tool_cargo(
builder,
Expand Down Expand Up @@ -476,9 +474,11 @@ impl Step for RustDemangler {
let host = self.host;
let compiler = builder.compiler(stage, host);

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

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

builder
.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() })
.expect("in-tree tool");
builder.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() });
let mut cargo = tool::prepare_tool_cargo(
builder,
compiler,
Expand Down Expand Up @@ -1668,13 +1667,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
if mode == "coverage-run" {
// The demangler doesn't need the current compiler, so we can avoid
// unnecessary rebuilds by using the bootstrap compiler instead.
let rust_demangler = builder
.ensure(tool::RustDemangler {
compiler: compiler.with_stage(0),
target: compiler.host,
extra_features: Vec::new(),
})
.expect("in-tree tool");
let rust_demangler = builder.ensure(tool::RustDemangler {
compiler: compiler.with_stage(0),
target: compiler.host,
extra_features: Vec::new(),
});
cmd.arg("--rust-demangler-path").arg(rust_demangler);
}

Expand Down
Loading

0 comments on commit 29abb90

Please sign in to comment.