diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2023-01-25 18:48:07 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2023-01-31 10:29:33 -0500 |
| commit | 652f79e83543eab07c33840748cf5df37b42ac66 (patch) | |
| tree | 53ab292dc1a9142867c91a81578af11ae8cc317c /src/bootstrap/download.rs | |
| parent | 5b08c9f39754039ef9c6cbde157ac9eb8c252a58 (diff) | |
| download | rust-652f79e83543eab07c33840748cf5df37b42ac66.tar.gz rust-652f79e83543eab07c33840748cf5df37b42ac66.zip | |
Download rustc component for rustfmt toolchain as well
Diffstat (limited to 'src/bootstrap/download.rs')
| -rw-r--r-- | src/bootstrap/download.rs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/bootstrap/download.rs b/src/bootstrap/download.rs index 6ae283f32a5..1be7c6777a7 100644 --- a/src/bootstrap/download.rs +++ b/src/bootstrap/download.rs @@ -318,15 +318,27 @@ impl Config { let channel = format!("{version}-{date}"); let host = self.build; - let rustfmt_path = self.initial_rustc.with_file_name(exe("rustfmt", host)); - let bin_root = self.out.join(host.triple).join("stage0"); + let bin_root = self.out.join(host.triple).join("rustfmt"); + let rustfmt_path = bin_root.join("bin").join(exe("rustfmt", host)); let rustfmt_stamp = bin_root.join(".rustfmt-stamp"); if rustfmt_path.exists() && !program_out_of_date(&rustfmt_stamp, &channel) { return Some(rustfmt_path); } - let filename = format!("rustfmt-{version}-{build}.tar.xz", build = host.triple); - self.download_component(DownloadSource::Dist, filename, "rustfmt-preview", &date, "stage0"); + self.download_component( + DownloadSource::Dist, + format!("rustfmt-{version}-{build}.tar.xz", build = host.triple), + "rustfmt-preview", + &date, + "rustfmt", + ); + self.download_component( + DownloadSource::Dist, + format!("rustc-{version}-{build}.tar.xz", build = host.triple), + "rustc", + &date, + "rustfmt", + ); self.fix_bin_or_dylib(&bin_root.join("bin").join("rustfmt")); self.fix_bin_or_dylib(&bin_root.join("bin").join("cargo-fmt")); |
