@@ -163,12 +163,13 @@ def download_stage0(self):
163
163
if not os .path .exists (rustc_cache ):
164
164
os .makedirs (rustc_cache )
165
165
166
+ channel = self .stage0_rustc_channel ()
167
+
166
168
if self .rustc ().startswith (self .bin_root ()) and \
167
169
(not os .path .exists (self .rustc ()) or self .rustc_out_of_date ()):
168
170
self .print_what_it_means_to_bootstrap ()
169
171
if os .path .exists (self .bin_root ()):
170
172
shutil .rmtree (self .bin_root ())
171
- channel = self .stage0_rustc_channel ()
172
173
filename = "rust-std-{}-{}.tar.gz" .format (channel , self .build )
173
174
url = "https://static.rust-lang.org/dist/" + self .stage0_rustc_date ()
174
175
tarball = os .path .join (rustc_cache , filename )
@@ -189,6 +190,14 @@ def download_stage0(self):
189
190
with open (self .rustc_stamp (), 'w' ) as f :
190
191
f .write (self .stage0_rustc_date ())
191
192
193
+ if "pc-windows-gnu" in self .build :
194
+ filename = "rust-mingw-{}-{}.tar.gz" .format (channel , self .build )
195
+ url = "https://static.rust-lang.org/dist/" + self .stage0_rustc_date ()
196
+ tarball = os .path .join (rustc_cache , filename )
197
+ if not os .path .exists (tarball ):
198
+ get ("{}/{}" .format (url , filename ), tarball , verbose = self .verbose )
199
+ unpack (tarball , self .bin_root (), match = "rust-mingw" , verbose = self .verbose )
200
+
192
201
if self .cargo ().startswith (self .bin_root ()) and \
193
202
(not os .path .exists (self .cargo ()) or self .cargo_out_of_date ()):
194
203
self .print_what_it_means_to_bootstrap ()
0 commit comments