summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-04 21:17:33 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-18 12:21:44 (GMT)
commite5c22c0a4b93895334a10d412124ffff69c3fd25 (patch)
treef04be9f0e0d0e2fcfd5101e9dd9a2dfe3cc1141b /src/graph.h
parenta4970769519b09fec5ff6ffe73a5fa2bf9f252e4 (diff)
downloadNinja-e5c22c0a4b93895334a10d412124ffff69c3fd25.zip
Ninja-e5c22c0a4b93895334a10d412124ffff69c3fd25.tar.gz
Ninja-e5c22c0a4b93895334a10d412124ffff69c3fd25.tar.bz2
Teach DependencyScan to load a dyndep file
Add a LoadDyndeps method to load a dyndep file and update the edges that name it in their dyndep binding.
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/graph.h b/src/graph.h
index 745297d..75edbc5 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -19,6 +19,7 @@
#include <vector>
using namespace std;
+#include "dyndep.h"
#include "eval_env.h"
#include "timestamp.h"
#include "util.h"
@@ -270,7 +271,8 @@ struct DependencyScan {
DepfileParserOptions const* depfile_parser_options)
: build_log_(build_log),
disk_interface_(disk_interface),
- dep_loader_(state, deps_log, disk_interface, depfile_parser_options) {}
+ dep_loader_(state, deps_log, disk_interface, depfile_parser_options),
+ dyndep_loader_(state, disk_interface) {}
/// Update the |dirty_| state of the given node by inspecting its input edge.
/// Examine inputs, outputs, and command lines to judge whether an edge
@@ -295,6 +297,13 @@ struct DependencyScan {
return dep_loader_.deps_log();
}
+ /// Load a dyndep file from the given node's path and update the
+ /// build graph with the new information. One overload accepts
+ /// a caller-owned 'DyndepFile' object in which to store the
+ /// information loaded from the dyndep file.
+ bool LoadDyndeps(Node* node, string* err) const;
+ bool LoadDyndeps(Node* node, DyndepFile* ddf, string* err) const;
+
private:
bool RecomputeDirty(Node* node, vector<Node*>* stack, string* err);
bool VerifyDAG(Node* node, vector<Node*>* stack, string* err);
@@ -307,6 +316,7 @@ struct DependencyScan {
BuildLog* build_log_;
DiskInterface* disk_interface_;
ImplicitDepLoader dep_loader_;
+ DyndepLoader dyndep_loader_;
};
#endif // NINJA_GRAPH_H_