diff options
author | Evan Martin <martine@danga.com> | 2012-12-30 18:15:49 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2013-04-08 21:45:07 (GMT) |
commit | 70fd0f590c3a46a4a9ff9a160f455c5c30f5b90a (patch) | |
tree | 6c0da3bb1ea04f301a62005a47997f013346536b /src | |
parent | 6e21a236edd859b885f8c1bea8090bbdd76bf15d (diff) | |
download | Ninja-70fd0f590c3a46a4a9ff9a160f455c5c30f5b90a.zip Ninja-70fd0f590c3a46a4a9ff9a160f455c5c30f5b90a.tar.gz Ninja-70fd0f590c3a46a4a9ff9a160f455c5c30f5b90a.tar.bz2 |
plumb DepsLog load through Builder
Diffstat (limited to 'src')
-rw-r--r-- | src/build.cc | 5 | ||||
-rw-r--r-- | src/build.h | 3 | ||||
-rw-r--r-- | src/build_test.cc | 2 | ||||
-rw-r--r-- | src/disk_interface_test.cc | 2 | ||||
-rw-r--r-- | src/graph.h | 9 | ||||
-rw-r--r-- | src/graph_test.cc | 2 | ||||
-rw-r--r-- | src/ninja.cc | 5 |
7 files changed, 16 insertions, 12 deletions
diff --git a/src/build.cc b/src/build.cc index 451d7ca..f44cd52 100644 --- a/src/build.cc +++ b/src/build.cc @@ -604,9 +604,10 @@ bool RealCommandRunner::WaitForCommand(Result* result) { } Builder::Builder(State* state, const BuildConfig& config, - BuildLog* log, DiskInterface* disk_interface) + BuildLog* build_log, DepsLog* deps_log, + DiskInterface* disk_interface) : state_(state), config_(config), disk_interface_(disk_interface), - scan_(state, log, disk_interface) { + scan_(state, build_log, deps_log, disk_interface) { status_ = new BuildStatus(config); } diff --git a/src/build.h b/src/build.h index fa73620..36bca57 100644 --- a/src/build.h +++ b/src/build.h @@ -140,7 +140,8 @@ struct BuildConfig { /// Builder wraps the build process: starting commands, updating status. struct Builder { Builder(State* state, const BuildConfig& config, - BuildLog* log, DiskInterface* disk_interface); + BuildLog* build_log, DepsLog* deps_log, + DiskInterface* disk_interface); ~Builder(); /// Clean up after interrupted commands by deleting output files. diff --git a/src/build_test.cc b/src/build_test.cc index a74beb9..3617439 100644 --- a/src/build_test.cc +++ b/src/build_test.cc @@ -394,7 +394,7 @@ struct FakeCommandRunner : public CommandRunner { struct BuildTest : public StateTestWithBuiltinRules { BuildTest() : config_(MakeConfig()), command_runner_(&fs_), - builder_(&state_, config_, NULL, &fs_), + builder_(&state_, config_, NULL, NULL, &fs_), status_(config_) { builder_.command_runner_.reset(&command_runner_); AssertParse(&state_, diff --git a/src/disk_interface_test.cc b/src/disk_interface_test.cc index c2315c7..9b43d0f 100644 --- a/src/disk_interface_test.cc +++ b/src/disk_interface_test.cc @@ -104,7 +104,7 @@ TEST_F(DiskInterfaceTest, RemoveFile) { struct StatTest : public StateTestWithBuiltinRules, public DiskInterface { - StatTest() : scan_(&state_, NULL, this) {} + StatTest() : scan_(&state_, NULL, NULL, this) {} // DiskInterface implementation. virtual TimeStamp Stat(const string& path); diff --git a/src/graph.h b/src/graph.h index b27111b..d943702 100644 --- a/src/graph.h +++ b/src/graph.h @@ -188,8 +188,9 @@ struct Edge { /// ImplicitDepLoader loads implicit dependencies, as referenced via the /// "depfile" attribute in build files. struct ImplicitDepLoader { - explicit ImplicitDepLoader(State* state, DiskInterface* disk_interface) - : state_(state), disk_interface_(disk_interface) {} + ImplicitDepLoader(State* state, DepsLog* deps_log, + DiskInterface* disk_interface) + : state_(state), disk_interface_(disk_interface), deps_log_(deps_log) {} bool LoadDepFile(Edge* edge, const string& path, string* err); bool LoadDepsFromLog(Edge* edge, string* err); @@ -213,11 +214,11 @@ struct ImplicitDepLoader { /// DependencyScan manages the process of scanning the files in a graph /// and updating the dirty/outputs_ready state of all the nodes and edges. struct DependencyScan { - DependencyScan(State* state, BuildLog* build_log, + DependencyScan(State* state, BuildLog* build_log, DepsLog* deps_log, DiskInterface* disk_interface) : build_log_(build_log), disk_interface_(disk_interface), - dep_loader_(state, disk_interface) {} + dep_loader_(state, deps_log, disk_interface) {} /// Examine inputs, outputs, and command lines to judge whether an edge /// needs to be re-run, and update outputs_ready_ and each outputs' |dirty_| diff --git a/src/graph_test.cc b/src/graph_test.cc index c105684..63d5757 100644 --- a/src/graph_test.cc +++ b/src/graph_test.cc @@ -17,7 +17,7 @@ #include "test.h" struct GraphTest : public StateTestWithBuiltinRules { - GraphTest() : scan_(&state_, NULL, &fs_) {} + GraphTest() : scan_(&state_, NULL, NULL, &fs_) {} VirtualFileSystem fs_; DependencyScan scan_; diff --git a/src/ninja.cc b/src/ninja.cc index 9f4d67b..8ba1aa6 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -919,7 +919,7 @@ reload: if (!rebuilt_manifest) { // Don't get caught in an infinite loop by a rebuild // target that is never up to date. - Builder manifest_builder(globals.state, config, &build_log, + Builder manifest_builder(globals.state, config, &build_log, &deps_log, &disk_interface); if (RebuildManifest(&manifest_builder, input_file, &err)) { rebuilt_manifest = true; @@ -931,7 +931,8 @@ reload: } } - Builder builder(globals.state, config, &build_log, &disk_interface); + Builder builder(globals.state, config, &build_log, &deps_log, + &disk_interface); int result = RunBuild(&builder, argc, argv); if (g_metrics) DumpMetrics(&globals); |