about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
diff options
context:
space:
mode:
authorVadim Chugunov <vadimcn@gmail.com>2017-03-24 10:58:18 -0700
committerVadim Chugunov <vadimcn@gmail.com>2017-03-30 16:31:46 -0700
commit3b1ba01095aaf37e3f3edf251332e0682bd98c8a (patch)
treebdc7eabcd36843265373ef128bba299706f5bf72 /src/bootstrap/bootstrap.py
parent7c2fc62a47a9e7e6c71492d5b3752ab78cf0af0d (diff)
downloadrust-3b1ba01095aaf37e3f3edf251332e0682bd98c8a.tar.gz
rust-3b1ba01095aaf37e3f3edf251332e0682bd98c8a.zip
Fix stage0->stage1 build when using "pthreads" mingw compiler.
Diffstat (limited to 'src/bootstrap/bootstrap.py')
-rw-r--r--src/bootstrap/bootstrap.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index d5bc6127a1e..9f9d3471640 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -163,12 +163,13 @@ class RustBuild(object):
         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)
@@ -189,6 +190,14 @@ class RustBuild(object):
             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()