1
Fork 0

Remove the unused extra_features field from tool_extended!

This field was introduced in #48097 to support the "clippy" feature of RLS.
This commit is contained in:
Zalathar 2025-01-01 23:30:50 +11:00
parent c528b8c678
commit e76c484d6d
4 changed files with 18 additions and 46 deletions

View file

@ -1152,7 +1152,7 @@ impl Step for Rls {
let compiler = self.compiler; let compiler = self.compiler;
let target = self.target; let target = self.target;
let rls = builder.ensure(tool::Rls { compiler, target, extra_features: Vec::new() }); let rls = builder.ensure(tool::Rls { compiler, target });
let mut tarball = Tarball::new(builder, "rls", &target.triple); let mut tarball = Tarball::new(builder, "rls", &target.triple);
tarball.set_overlay(OverlayKind::Rls); tarball.set_overlay(OverlayKind::Rls);
@ -1239,9 +1239,8 @@ impl Step for Clippy {
// Prepare the image directory // Prepare the image directory
// We expect clippy to build, because we've exited this step above if tool // We expect clippy to build, because we've exited this step above if tool
// state for clippy isn't testing. // state for clippy isn't testing.
let clippy = builder.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() }); let clippy = builder.ensure(tool::Clippy { compiler, target });
let cargoclippy = let cargoclippy = builder.ensure(tool::CargoClippy { compiler, target });
builder.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() });
let mut tarball = Tarball::new(builder, "clippy", &target.triple); let mut tarball = Tarball::new(builder, "clippy", &target.triple);
tarball.set_overlay(OverlayKind::Clippy); tarball.set_overlay(OverlayKind::Clippy);
@ -1290,9 +1289,8 @@ impl Step for Miri {
let compiler = self.compiler; let compiler = self.compiler;
let target = self.target; let target = self.target;
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() }); let miri = builder.ensure(tool::Miri { compiler, target });
let cargomiri = let cargomiri = builder.ensure(tool::CargoMiri { compiler, target });
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() });
let mut tarball = Tarball::new(builder, "miri", &target.triple); let mut tarball = Tarball::new(builder, "miri", &target.triple);
tarball.set_overlay(OverlayKind::Miri); tarball.set_overlay(OverlayKind::Miri);
@ -1423,10 +1421,8 @@ impl Step for Rustfmt {
let compiler = self.compiler; let compiler = self.compiler;
let target = self.target; let target = self.target;
let rustfmt = let rustfmt = builder.ensure(tool::Rustfmt { compiler, target });
builder.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() }); let cargofmt = builder.ensure(tool::Cargofmt { compiler, target });
let cargofmt =
builder.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() });
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple); let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
tarball.set_overlay(OverlayKind::Rustfmt); tarball.set_overlay(OverlayKind::Rustfmt);
tarball.is_preview(true); tarball.is_preview(true);

View file

@ -409,7 +409,7 @@ impl Step for Rustfmt {
let host = self.host; let host = self.host;
let compiler = builder.compiler(stage, host); let compiler = builder.compiler(stage, host);
builder.ensure(tool::Rustfmt { compiler, target: self.host, extra_features: Vec::new() }); builder.ensure(tool::Rustfmt { compiler, target: self.host });
let mut cargo = tool::prepare_tool_cargo( let mut cargo = tool::prepare_tool_cargo(
builder, builder,
@ -511,17 +511,9 @@ impl Step for Miri {
let host_compiler = builder.compiler(stage - 1, host); let host_compiler = builder.compiler(stage - 1, host);
// Build our tools. // Build our tools.
let miri = builder.ensure(tool::Miri { let miri = builder.ensure(tool::Miri { compiler: host_compiler, target: host });
compiler: host_compiler,
target: host,
extra_features: Vec::new(),
});
// the ui tests also assume cargo-miri has been built // the ui tests also assume cargo-miri has been built
builder.ensure(tool::CargoMiri { builder.ensure(tool::CargoMiri { compiler: host_compiler, target: host });
compiler: host_compiler,
target: host,
extra_features: Vec::new(),
});
// We also need sysroots, for Miri and for the host (the latter for build scripts). // We also need sysroots, for Miri and for the host (the latter for build scripts).
// This is for the tests so everything is done with the target compiler. // This is for the tests so everything is done with the target compiler.
@ -740,7 +732,7 @@ impl Step for Clippy {
let host = self.host; let host = self.host;
let compiler = builder.compiler(stage, host); let compiler = builder.compiler(stage, host);
builder.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() }); builder.ensure(tool::Clippy { compiler, target: self.host });
let mut cargo = tool::prepare_tool_cargo( let mut cargo = tool::prepare_tool_cargo(
builder, builder,
compiler, compiler,

View file

@ -1021,7 +1021,6 @@ macro_rules! tool_extended {
pub struct $name { pub struct $name {
pub compiler: Compiler, pub compiler: Compiler,
pub target: TargetSelection, pub target: TargetSelection,
pub extra_features: Vec<String>,
} }
impl Step for $name { impl Step for $name {
@ -1051,7 +1050,6 @@ macro_rules! tool_extended {
run.builder.ensure($name { run.builder.ensure($name {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build), compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
target: run.target, target: run.target,
extra_features: Vec::new(),
}); });
} }
@ -1063,7 +1061,7 @@ macro_rules! tool_extended {
tool: $tool_name, tool: $tool_name,
mode: if false $(|| $tool_std)? { Mode::ToolStd } else { Mode::ToolRustc }, mode: if false $(|| $tool_std)? { Mode::ToolStd } else { Mode::ToolRustc },
path: $path, path: $path,
extra_features: $sel.extra_features, extra_features: vec![],
source_type: SourceType::InTree, source_type: SourceType::InTree,
allow_features: concat!($($allow_features)*), allow_features: concat!($($allow_features)*),
cargo_args: vec![] cargo_args: vec![]

View file

@ -1339,16 +1339,9 @@ impl<'a> Builder<'a> {
} }
let build_compiler = self.compiler(run_compiler.stage - 1, self.build.build); let build_compiler = self.compiler(run_compiler.stage - 1, self.build.build);
self.ensure(tool::Clippy { self.ensure(tool::Clippy { compiler: build_compiler, target: self.build.build });
compiler: build_compiler, let cargo_clippy =
target: self.build.build, self.ensure(tool::CargoClippy { compiler: build_compiler, target: self.build.build });
extra_features: vec![],
});
let cargo_clippy = self.ensure(tool::CargoClippy {
compiler: build_compiler,
target: self.build.build,
extra_features: vec![],
});
let mut dylib_path = helpers::dylib_path(); let mut dylib_path = helpers::dylib_path();
dylib_path.insert(0, self.sysroot(run_compiler).join("lib")); dylib_path.insert(0, self.sysroot(run_compiler).join("lib"));
@ -1363,16 +1356,9 @@ impl<'a> Builder<'a> {
let build_compiler = self.compiler(run_compiler.stage - 1, self.build.build); let build_compiler = self.compiler(run_compiler.stage - 1, self.build.build);
// Prepare the tools // Prepare the tools
let miri = self.ensure(tool::Miri { let miri = self.ensure(tool::Miri { compiler: build_compiler, target: self.build.build });
compiler: build_compiler, let cargo_miri =
target: self.build.build, self.ensure(tool::CargoMiri { compiler: build_compiler, target: self.build.build });
extra_features: Vec::new(),
});
let cargo_miri = self.ensure(tool::CargoMiri {
compiler: build_compiler,
target: self.build.build,
extra_features: Vec::new(),
});
// Invoke cargo-miri, make sure it can find miri and cargo. // Invoke cargo-miri, make sure it can find miri and cargo.
let mut cmd = command(cargo_miri); let mut cmd = command(cargo_miri);
cmd.env("MIRI", &miri); cmd.env("MIRI", &miri);