Skip to content

Commit 3b1ba01

Browse files
committed
Fix stage0->stage1 build when using "pthreads" mingw compiler.
1 parent 7c2fc62 commit 3b1ba01

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/bootstrap/bootstrap.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,13 @@ def download_stage0(self):
163163
if not os.path.exists(rustc_cache):
164164
os.makedirs(rustc_cache)
165165

166+
channel = self.stage0_rustc_channel()
167+
166168
if self.rustc().startswith(self.bin_root()) and \
167169
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
168170
self.print_what_it_means_to_bootstrap()
169171
if os.path.exists(self.bin_root()):
170172
shutil.rmtree(self.bin_root())
171-
channel = self.stage0_rustc_channel()
172173
filename = "rust-std-{}-{}.tar.gz".format(channel, self.build)
173174
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
174175
tarball = os.path.join(rustc_cache, filename)
@@ -189,6 +190,14 @@ def download_stage0(self):
189190
with open(self.rustc_stamp(), 'w') as f:
190191
f.write(self.stage0_rustc_date())
191192

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+
192201
if self.cargo().startswith(self.bin_root()) and \
193202
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
194203
self.print_what_it_means_to_bootstrap()

0 commit comments

Comments
 (0)