Skip to content

Commit 4adb13c

Browse files
committedJul 17, 2020
rustbuild: drop tool::should_install
Always install when the build succeeds Fixes #74431 Signed-off-by: Marc-Antoine Perennou <[email protected]>
1 parent 3014f23 commit 4adb13c

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed
 

‎src/bootstrap/install.rs

+5-24
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,6 @@ macro_rules! install {
159159
config.extended && config.tools.as_ref()
160160
.map_or(true, |t| t.contains($path))
161161
}
162-
163-
#[allow(dead_code)]
164-
fn should_install(builder: &Builder<'_>) -> bool {
165-
builder.config.tools.as_ref().map_or(false, |t| t.contains($path))
166-
}
167162
}
168163

169164
impl Step for $name {
@@ -210,8 +205,7 @@ install!((self, builder, _config),
210205
install_cargo(builder, self.compiler.stage, self.target);
211206
};
212207
Rls, "rls", Self::should_build(_config), only_hosts: true, {
213-
if builder.ensure(dist::Rls { compiler: self.compiler, target: self.target }).is_some() ||
214-
Self::should_install(builder) {
208+
if builder.ensure(dist::Rls { compiler: self.compiler, target: self.target }).is_some() {
215209
install_rls(builder, self.compiler.stage, self.target);
216210
} else {
217211
builder.info(
@@ -221,27 +215,14 @@ install!((self, builder, _config),
221215
};
222216
RustAnalyzer, "rust-analyzer", Self::should_build(_config), only_hosts: true, {
223217
builder.ensure(dist::RustAnalyzer { compiler: self.compiler, target: self.target });
224-
if Self::should_install(builder) {
225-
install_rust_analyzer(builder, self.compiler.stage, self.target);
226-
} else {
227-
builder.info(
228-
&format!("skipping Install rust-analyzer stage{} ({})", self.compiler.stage, self.target),
229-
);
230-
}
218+
install_rust_analyzer(builder, self.compiler.stage, self.target);
231219
};
232220
Clippy, "clippy", Self::should_build(_config), only_hosts: true, {
233221
builder.ensure(dist::Clippy { compiler: self.compiler, target: self.target });
234-
if Self::should_install(builder) {
235-
install_clippy(builder, self.compiler.stage, self.target);
236-
} else {
237-
builder.info(
238-
&format!("skipping Install clippy stage{} ({})", self.compiler.stage, self.target),
239-
);
240-
}
222+
install_clippy(builder, self.compiler.stage, self.target);
241223
};
242224
Miri, "miri", Self::should_build(_config), only_hosts: true, {
243-
if builder.ensure(dist::Miri { compiler: self.compiler, target: self.target }).is_some() ||
244-
Self::should_install(builder) {
225+
if builder.ensure(dist::Miri { compiler: self.compiler, target: self.target }).is_some() {
245226
install_miri(builder, self.compiler.stage, self.target);
246227
} else {
247228
builder.info(
@@ -253,7 +234,7 @@ install!((self, builder, _config),
253234
if builder.ensure(dist::Rustfmt {
254235
compiler: self.compiler,
255236
target: self.target
256-
}).is_some() || Self::should_install(builder) {
237+
}).is_some() {
257238
install_rustfmt(builder, self.compiler.stage, self.target);
258239
} else {
259240
builder.info(

0 commit comments

Comments
 (0)