about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2021-02-19 13:25:26 -0500
committerFelix S. Klock II <pnkfelix@pnkfx.org>2021-02-25 11:38:51 -0500
commit0d8bf72a36eb78c1a9bf721b9af3055f62cfc3dc (patch)
treea3dbb6be972310ca8d43fde7d7822d519cb820e7 /src/bootstrap
parentb36f77012dcbfbcf7d04e29fb9a10c8ead9b3ab1 (diff)
downloadrust-0d8bf72a36eb78c1a9bf721b9af3055f62cfc3dc.tar.gz
rust-0d8bf72a36eb78c1a9bf721b9af3055f62cfc3dc.zip
Created experimental build.print_step_rusage setting
Intended to piggy-back on output from existing build.print_step_timings setting.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/builder.rs4
-rw-r--r--src/bootstrap/config.rs3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 61554a316d0..c0175a0710f 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -1259,6 +1259,10 @@ impl<'a> Builder<'a> {
             cargo.env("RUSTC_PRINT_STEP_TIMINGS", "1");
         }
 
+        if self.config.print_step_rusage {
+            cargo.env("RUSTC_PRINT_STEP_RUSAGE", "1");
+        }
+
         if self.config.backtrace_on_ice {
             cargo.env("RUSTC_BACKTRACE_ON_ICE", "1");
         }
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index d50d605d5c6..b2af8e59b7c 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -161,6 +161,7 @@ pub struct Config {
     pub verbose_tests: bool,
     pub save_toolstates: Option<PathBuf>,
     pub print_step_timings: bool,
+    pub print_step_rusage: bool,
     pub missing_tools: bool,
 
     // Fallback musl-root for all targets
@@ -380,6 +381,7 @@ struct Build {
     configure_args: Option<Vec<String>>,
     local_rebuild: Option<bool>,
     print_step_timings: Option<bool>,
+    print_step_rusage: Option<bool>,
     check_stage: Option<u32>,
     doc_stage: Option<u32>,
     build_stage: Option<u32>,
@@ -679,6 +681,7 @@ impl Config {
         set(&mut config.configure_args, build.configure_args);
         set(&mut config.local_rebuild, build.local_rebuild);
         set(&mut config.print_step_timings, build.print_step_timings);
+        set(&mut config.print_step_rusage, build.print_step_rusage);
 
         // See https://github.com/rust-lang/compiler-team/issues/326
         config.stage = match config.cmd {