From 753dff63c60dba76217fc3ca18871695bdef14b6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 3 Jan 2017 14:07:30 -0800 Subject: [PATCH 1/2] rustbuild: Allow create_sysroot in stage0 Despite what the comment says, we actually need to do this. We're not cleaning out the stage0 compiler's sysroot, but rather just our own sysroot that we assembled previously. --- src/bootstrap/compile.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index a7633998aad8b..7f907d98b1ec4 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -258,11 +258,6 @@ fn compiler_file(compiler: &Path, file: &str) -> PathBuf { } pub fn create_sysroot(build: &Build, compiler: &Compiler) { - // nothing to do in stage0 - if compiler.stage == 0 { - return - } - let sysroot = build.sysroot(compiler); let _ = fs::remove_dir_all(&sysroot); t!(fs::create_dir_all(&sysroot)); From 3ab778b4afc1c11e48dd8b1f82c5dca9c897bcba Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 3 Jan 2017 14:16:05 -0800 Subject: [PATCH 2/2] rustbuild: Update where we look for mtime changes Recent versions of Cargo lift less output up into the "main" directory, so let's look more inside the `deps` folder for changes to propagate differences. Closes #38744 Closes #38746 --- src/bootstrap/compile.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 7f907d98b1ec4..31f8754d2091e 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -391,7 +391,7 @@ pub fn tool(build: &Build, stage: u32, host: &str, tool: &str) { /// all files in a directory and updating the stamp if any are newer. fn update_mtime(path: &Path) { let mut max = None; - if let Ok(entries) = path.parent().unwrap().read_dir() { + if let Ok(entries) = path.parent().unwrap().join("deps").read_dir() { for entry in entries.map(|e| t!(e)) { if t!(entry.file_type()).is_file() { let meta = t!(entry.metadata());