From 17ae752093dca428c6c0ba4eb23678b522f33b18 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 25 Feb 2016 09:29:02 -0800 Subject: [PATCH] rustbuild: Update nightly date Also fix a bug where we didn't clean out previous nightlies --- src/bootstrap/bootstrap.py | 1 + src/bootstrap/build/mod.rs | 17 ++++++++++------- src/nightlies.txt | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 744c30aa08f07..6659894a171f0 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -73,6 +73,7 @@ def download_rust_nightly(self): if self.rustc().startswith(self.bin_root()) and \ (not os.path.exists(self.rustc()) or self.rustc_out_of_date()): + shutil.rmtree(self.bin_root()) filename = "rust-std-nightly-" + self.build + ".tar.gz" url = "https://static.rust-lang.org/dist/" + self.snap_rustc_date() tarball = os.path.join(rustc_cache, filename) diff --git a/src/bootstrap/build/mod.rs b/src/bootstrap/build/mod.rs index ee4d7337dc1be..7b3ac7d2f7e97 100644 --- a/src/bootstrap/build/mod.rs +++ b/src/bootstrap/build/mod.rs @@ -39,6 +39,14 @@ mod sanity; mod step; mod util; +#[cfg(windows)] +mod job; + +#[cfg(not(windows))] +mod job { + pub unsafe fn setup() {} +} + pub use build::config::Config; pub use build::flags::Flags; @@ -114,14 +122,9 @@ impl Build { pub fn build(&mut self) { use build::step::Source::*; - // see comments in job.rs for what's going on here - #[cfg(windows)] - fn setup_job() { - mod job; - unsafe { job::setup() } + unsafe { + job::setup(); } - #[cfg(not(windows))] fn setup_job() {} - setup_job(); if self.flags.clean { return clean::clean(self); diff --git a/src/nightlies.txt b/src/nightlies.txt index 86186222d90bb..59e2fce6f0938 100644 --- a/src/nightlies.txt +++ b/src/nightlies.txt @@ -1,2 +1,2 @@ -rustc: 2015-12-19 +rustc: 2016-02-17 cargo: 2016-01-21