Skip to content

Commit

Permalink
Fix stage0->stage1 build when using "pthreads" mingw compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimcn committed Mar 30, 2017
1 parent 7c2fc62 commit 3b1ba01
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/bootstrap/bootstrap.py
Expand Up @@ -163,12 +163,13 @@ def download_stage0(self):
if not os.path.exists(rustc_cache):
os.makedirs(rustc_cache)

channel = self.stage0_rustc_channel()

if self.rustc().startswith(self.bin_root()) and \
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
self.print_what_it_means_to_bootstrap()
if os.path.exists(self.bin_root()):
shutil.rmtree(self.bin_root())
channel = self.stage0_rustc_channel()
filename = "rust-std-{}-{}.tar.gz".format(channel, self.build)
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
tarball = os.path.join(rustc_cache, filename)
Expand All @@ -189,6 +190,14 @@ def download_stage0(self):
with open(self.rustc_stamp(), 'w') as f:
f.write(self.stage0_rustc_date())

if "pc-windows-gnu" in self.build:
filename = "rust-mingw-{}-{}.tar.gz".format(channel, self.build)
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
tarball = os.path.join(rustc_cache, filename)
if not os.path.exists(tarball):
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
unpack(tarball, self.bin_root(), match="rust-mingw", verbose=self.verbose)

if self.cargo().startswith(self.bin_root()) and \
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
self.print_what_it_means_to_bootstrap()
Expand Down

0 comments on commit 3b1ba01

Please sign in to comment.