don't track timing for phony edges
authorEvan Martin <martine@danga.com>
Sat, 8 Jan 2011 23:15:44 +0000 (15:15 -0800)
committerEvan Martin <martine@danga.com>
Sat, 8 Jan 2011 23:15:44 +0000 (15:15 -0800)
src/build.cc

index bf897a3e3967489b3a9fcaccd038d6fb7a5e6ca2..2eb08cbea059c8d1ab94c31263cb24e6e5a2130f 100644 (file)
@@ -32,13 +32,13 @@ void BuildStatus::PlanHasTotalEdges(int total) {
 }
 
 void BuildStatus::BuildEdgeStarted(Edge* edge) {
+  if (edge->rule_ == &State::kPhonyRule)
+    return;
+
   timeval now;
   gettimeofday(&now, NULL);
   running_edges_.insert(make_pair(edge, now));
 
-  if (edge->rule_ == &State::kPhonyRule)
-    return;
-
   string desc = edge->GetDescription();
   if (verbosity_ != BuildConfig::QUIET) {
     if (verbosity_ != BuildConfig::VERBOSE && !desc.empty())
@@ -49,6 +49,9 @@ void BuildStatus::BuildEdgeStarted(Edge* edge) {
 }
 
 void BuildStatus::BuildEdgeFinished(Edge* edge) {
+  if (edge->rule_ == &State::kPhonyRule)
+    return;
+
   timeval now;
   gettimeofday(&now, NULL);
   ++finished_edges_;