]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/compile.rs
Use more consistent progress messages in bootstrap
[rust.git] / src / bootstrap / compile.rs
index 427e1a3863e20cb8869166361ad4f89752a76436..35bdfbfa0ed1a3bf1f10013c36b9be84e3aa3ef0 100644 (file)
@@ -18,6 +18,7 @@
 
 use serde::Deserialize;
 
+use crate::builder::crate_description;
 use crate::builder::Cargo;
 use crate::builder::{Builder, Kind, RunConfig, ShouldRun, Step};
 use crate::cache::{Interned, INTERNER};
@@ -110,7 +111,10 @@ fn run(self, builder: &Builder<'_>) {
         let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
         if compiler_to_use != compiler {
             builder.ensure(Std::new(compiler_to_use, target));
-            builder.info(&format!("Uplifting stage1 std ({} -> {})", compiler_to_use.host, target));
+            builder.info(&format!(
+                "Uplifting stage1 library ({} -> {})",
+                compiler_to_use.host, target
+            ));
 
             // Even if we're not building std this stage, the new sysroot must
             // still contain the third party objects needed by various targets.
@@ -126,15 +130,21 @@ fn run(self, builder: &Builder<'_>) {
 
         let mut cargo = builder.cargo(compiler, Mode::Std, SourceType::InTree, target, "build");
         std_cargo(builder, target, compiler.stage, &mut cargo);
+        for krate in &*self.crates {
+            cargo.arg("-p").arg(krate);
+        }
 
         builder.info(&format!(
-            "Building stage{} std artifacts ({} -> {})",
-            compiler.stage, &compiler.host, target
+            "Building{} stage{} library artifacts ({} -> {})",
+            crate_description(&self.crates),
+            compiler.stage,
+            &compiler.host,
+            target,
         ));
         run_cargo(
             builder,
             cargo,
-            self.crates.to_vec(),
+            vec![],
             &libstd_stamp(builder, compiler, target),
             target_deps,
             false,
@@ -425,7 +435,7 @@ fn run(self, builder: &Builder<'_>) {
         let target_compiler = self.target_compiler;
         let target = self.target;
         builder.info(&format!(
-            "Copying stage{} std from stage{} ({} -> {} / {})",
+            "Copying stage{} library from stage{} ({} -> {} / {})",
             target_compiler.stage, compiler.stage, &compiler.host, target_compiler.host, target
         ));
         let libdir = builder.sysroot_libdir(target_compiler, target);
@@ -691,7 +701,8 @@ fn run(self, builder: &Builder<'_>) {
             ));
         }
 
-        // cfg(bootstrap): remove if condition once the bootstrap compiler supports dylib LTO
+        // We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
+        // and may just be a time sink.
         if compiler.stage != 0 {
             match builder.config.rust_lto {
                 RustcLto::Thin | RustcLto::Fat => {
@@ -713,14 +724,21 @@ fn run(self, builder: &Builder<'_>) {
             }
         }
 
+        for krate in &*self.crates {
+            cargo.arg("-p").arg(krate);
+        }
+
         builder.info(&format!(
-            "Building stage{} compiler artifacts ({} -> {})",
-            compiler.stage, &compiler.host, target
+            "Building{} stage{} compiler artifacts ({} -> {})",
+            crate_description(&self.crates),
+            compiler.stage,
+            &compiler.host,
+            target,
         ));
         run_cargo(
             builder,
             cargo,
-            self.crates.to_vec(),
+            vec![],
             &librustc_stamp(builder, compiler, target),
             vec![],
             false,