Rollup merge of #48637 - segevfiner:restore-rust-mingw-download, r=alexcrichton

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

r? @alexcrichton
This commit is contained in:
kennytm 2018-03-03 18:45:47 +08:00 committed by GitHub
commit fb411d86c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,6 +349,14 @@ class RustBuild(object):
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)
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())):