Skip to content

Commit 20f22ba

Browse files
Rollup merge of rust-lang#119548 - onur-ozkan:remove-nested-target-iteration, r=Mark-Simulacrum
Use the current target instead of iterating over all targets Since we already iterate through targets in StepDescription::maybe_run, there is no need to iterate targets again in the install step for std. Compared the results before and after applying the changes to install step of std, and there were no differences. ```sh  ~/devspace/.other/rustc-builds $ sha256sum ./old/usr/local/lib/rustlib/manifest-rust-std-x86_64-* c2ea86fc25ffac87b0b135f31ba9644ad97549da4c050c3921b437d1e18285fd ./old/usr/local/lib/rustlib/manifest-rust-std-x86_64-pc-windows-gnu d2f1081a779962e2cbc27f53191783d13428abd0964465547af78ce34c7251dd ./old/usr/local/lib/rustlib/manifest-rust-std-x86_64-unknown-linux-gnu  ~/devspace/.other/rustc-builds $ sha256sum ./new/usr/local/lib/rustlib/manifest-rust-std-x86_64-* c2ea86fc25ffac87b0b135f31ba9644ad97549da4c050c3921b437d1e18285fd ./new/usr/local/lib/rustlib/manifest-rust-std-x86_64-pc-windows-gnu d2f1081a779962e2cbc27f53191783d13428abd0964465547af78ce34c7251dd ./new/usr/local/lib/rustlib/manifest-rust-std-x86_64-unknown-linux-gnu ``` Fixes rust-lang#119533
2 parents b8e1a34 + 15bb29e commit 20f22ba

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/bootstrap/src/core/build_steps/install.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,13 @@ install!((self, builder, _config),
204204
install_sh(builder, "docs", self.compiler.stage, Some(self.target), &tarball);
205205
};
206206
Std, path = "library/std", true, only_hosts: false, {
207-
for target in &builder.targets {
208-
// `expect` should be safe, only None when host != build, but this
209-
// only runs when host == build
210-
let tarball = builder.ensure(dist::Std {
211-
compiler: self.compiler,
212-
target: *target
213-
}).expect("missing std");
214-
install_sh(builder, "std", self.compiler.stage, Some(*target), &tarball);
215-
}
207+
// `expect` should be safe, only None when host != build, but this
208+
// only runs when host == build
209+
let tarball = builder.ensure(dist::Std {
210+
compiler: self.compiler,
211+
target: self.target
212+
}).expect("missing std");
213+
install_sh(builder, "std", self.compiler.stage, Some(self.target), &tarball);
216214
};
217215
Cargo, alias = "cargo", Self::should_build(_config), only_hosts: true, {
218216
let tarball = builder

0 commit comments

Comments
 (0)