about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2018-03-27 12:44:33 +0200
committerMark Simulacrum <mark.simulacrum@gmail.com>2018-04-03 11:43:12 -0600
commitb0dbc7c15d4f3027410b3836154da1ae63e0a7d3 (patch)
tree3cb21d315f0ef395fc0005beaf61b16c275e5cb2 /src/bootstrap/lib.rs
parentf4620a3d1471fd7943ebd413dcbc94d51bcfea8e (diff)
downloadrust-b0dbc7c15d4f3027410b3836154da1ae63e0a7d3.tar.gz
rust-b0dbc7c15d4f3027410b3836154da1ae63e0a7d3.zip
Implement generating graphs of the build steps
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index fca265fe41c..5b13fa27fbf 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -131,6 +131,7 @@ extern crate getopts;
 extern crate num_cpus;
 extern crate toml;
 extern crate time;
+extern crate petgraph;
 
 #[cfg(test)]
 #[macro_use]
@@ -600,14 +601,14 @@ impl Build {
 
     /// Runs a command, printing out nice contextual information if it fails.
     fn run(&self, cmd: &mut Command) {
-        if cfg!(test) { return; }
+        if self.config.dry_run { return; }
         self.verbose(&format!("running: {:?}", cmd));
         run_silent(cmd)
     }
 
     /// Runs a command, printing out nice contextual information if it fails.
     fn run_quiet(&self, cmd: &mut Command) {
-        if cfg!(test) { return; }
+        if self.config.dry_run { return; }
         self.verbose(&format!("running: {:?}", cmd));
         run_suppressed(cmd)
     }
@@ -616,7 +617,7 @@ impl Build {
     /// Exits if the command failed to execute at all, otherwise returns its
     /// `status.success()`.
     fn try_run(&self, cmd: &mut Command) -> bool {
-        if cfg!(test) { return true; }
+        if self.config.dry_run { return true; }
         self.verbose(&format!("running: {:?}", cmd));
         try_run_silent(cmd)
     }
@@ -625,7 +626,7 @@ impl Build {
     /// Exits if the command failed to execute at all, otherwise returns its
     /// `status.success()`.
     fn try_run_quiet(&self, cmd: &mut Command) -> bool {
-        if cfg!(test) { return true; }
+        if self.config.dry_run { return true; }
         self.verbose(&format!("running: {:?}", cmd));
         try_run_suppressed(cmd)
     }