]> git.lizzy.rs Git - rust.git/commitdiff
use stage 1 compiler only for stamps
authorCollins Abitekaniza <abtcolns@gmail.com>
Fri, 6 Jul 2018 19:56:13 +0000 (22:56 +0300)
committerMark Rousskov <mark.simulacrum@gmail.com>
Wed, 12 Sep 2018 19:31:49 +0000 (13:31 -0600)
src/bootstrap/builder.rs

index 8afe162c17c00bb6b20b6145c0276d714de9feb0..ab0d9a0664149f9ed71ebc803f0c26530fb69888 100644 (file)
@@ -721,29 +721,29 @@ pub fn cargo(
         // This is for the original compiler, but if we're forced to use stage 1, then
         // std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
         // we copy the libs forward.
-        let compiler = if self.force_use_stage1(compiler, target) {
+        let cmp = if self.force_use_stage1(compiler, target) {
             self.compiler(1, compiler.host)
         } else {
             compiler
         };
 
         let libstd_stamp = match cmd {
-            "check" => check::libstd_stamp(self, compiler, target),
-            _ => compile::libstd_stamp(self, compiler, target),
+            "check" => check::libstd_stamp(self, cmp, target),
+            _ => compile::libstd_stamp(self, cmp, target),
         };
 
         let libtest_stamp = match cmd {
-            "check" => check::libtest_stamp(self, compiler, target),
-            _ => compile::libstd_stamp(self, compiler, target),
+            "check" => check::libtest_stamp(self, cmp, target),
+            _ => compile::libstd_stamp(self, cmp, target),
         };
 
         let librustc_stamp = match cmd {
-            "check" => check::librustc_stamp(self, compiler, target),
-            _ => compile::librustc_stamp(self, compiler, target),
+            "check" => check::librustc_stamp(self, cmp, target),
+            _ => compile::librustc_stamp(self, cmp, target),
         };
 
         if cmd == "doc" {
-            if mode == Mode::Rustc || mode == Mode::ToolRustc {
+            if mode == Mode::Rustc || mode == Mode::ToolRustc || mode == Mode::Codegen {
                 // This is the intended out directory for compiler documentation.
                 my_out = self.compiler_doc_out(target);
             }