summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2010-12-26 20:46:59 (GMT)
committerEvan Martin <martine@danga.com>2010-12-26 20:46:59 (GMT)
commita1b5f6bfffa78b4689f172cf3d50416799798153 (patch)
tree71aa225a2d43b49d4e41bed924ed6e96a2a9b300 /src/build.cc
parent53fc63501dab3c40355f6a66cc712dd50081abfd (diff)
downloadNinja-a1b5f6bfffa78b4689f172cf3d50416799798153.zip
Ninja-a1b5f6bfffa78b4689f172cf3d50416799798153.tar.gz
Ninja-a1b5f6bfffa78b4689f172cf3d50416799798153.tar.bz2
move buildlog to main driver
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/build.cc b/src/build.cc
index 4d561fb..0607b24 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -248,7 +248,7 @@ Builder::Builder(State* state, const BuildConfig& config)
command_runner_ = new RealCommandRunner;
status_ = new BuildStatus;
status_->verbosity_ = config.verbosity;
- log_ = new BuildLog;
+ log_ = config.build_log;
}
Node* Builder::AddTarget(const string& name, string* err) {
@@ -276,9 +276,6 @@ bool Builder::Build(string* err) {
return true;
}
- if (!log_->OpenForWrite("ninja_log", err))
- return false;
-
status_->PlanHasTotalEdges(plan_.edge_count());
while (plan_.more_to_do()) {
while (command_runner_->CanRunMore()) {
@@ -340,5 +337,6 @@ void Builder::FinishEdge(Edge* edge) {
}
plan_.EdgeFinished(edge);
status_->BuildEdgeFinished(edge);
- log_->RecordCommand(edge, 0); // XXX get edge timing.
+ if (log_)
+ log_->RecordCommand(edge, 0); // XXX get edge timing.
}