about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-02-25 09:29:02 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-02-28 10:50:13 -0800
commit17ae752093dca428c6c0ba4eb23678b522f33b18 (patch)
treebd9550e522d364a7b13fd9deccd6ca655ea0ab2a /src/bootstrap
parent93a9ab1a1bb1e692516a07ece2ec6958c1aa0d3f (diff)
downloadrust-17ae752093dca428c6c0ba4eb23678b522f33b18.tar.gz
rust-17ae752093dca428c6c0ba4eb23678b522f33b18.zip
rustbuild: Update nightly date
Also fix a bug where we didn't clean out previous nightlies
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bootstrap.py1
-rw-r--r--src/bootstrap/build/mod.rs17
2 files changed, 11 insertions, 7 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 744c30aa08f..6659894a171 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -73,6 +73,7 @@ class RustBuild:
 
         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 ee4d7337dc1..7b3ac7d2f7e 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);