From 39d0b054cea73614a0c1dd06cd98d3d22eea6b10 Mon Sep 17 00:00:00 2001 From: Segev Finer Date: Thu, 1 Mar 2018 14:47:20 +0200 Subject: [PATCH 1/2] Restore the download of rust-mingw The build might otherwise break due to mixing MinGW object files from rust-std and the local MinGW which might be newer/older than the version used to build rust-std. Fixes #48272 --- src/bootstrap/bootstrap.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 5966bb65df9c8..761cc94c8c66f 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -351,6 +351,11 @@ def download_stage0(self): with open(self.rustc_stamp(), 'w') as rust_stamp: rust_stamp.write(self.date) + if "pc-windows-gnu" in self.build: + filename = "rust-mingw-{}-{}.tar.gz".format( + rustc_channel, self.build) + self._download_stage0_helper(filename, "rust-mingw") + if self.cargo().startswith(self.bin_root()) and \ (not os.path.exists(self.cargo()) or self.program_out_of_date(self.cargo_stamp())): From 5332d9a8e8a66e22b8c81f3f302ce72734ba137f Mon Sep 17 00:00:00 2001 From: Segev Finer Date: Thu, 1 Mar 2018 18:33:14 +0200 Subject: [PATCH 2/2] Document why we download rust-mingw --- src/bootstrap/bootstrap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 761cc94c8c66f..5d297570bc12c 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -351,6 +351,9 @@ def download_stage0(self): with open(self.rustc_stamp(), 'w') as rust_stamp: rust_stamp.write(self.date) + # This is required so that we don't mix incompatible MinGW + # libraries/binaries that are included in rust-std with + # the system MinGW ones. if "pc-windows-gnu" in self.build: filename = "rust-mingw-{}-{}.tar.gz".format( rustc_channel, self.build)