diff options
author | Peter Bell <peterbell10@live.co.uk> | 2022-03-08 01:40:43 (GMT) |
---|---|---|
committer | Peter Bell <peterbell10@live.co.uk> | 2022-03-08 04:49:22 (GMT) |
commit | 4bd8db1fa8287ec0b828e98a7d2bcdf3d6b1904f (patch) | |
tree | 86374a5343c972f2f42eb3dc416d3240a567ee94 /src/build.h | |
parent | 026498fb36b67518501eec2edc66ddcd64f64b1f (diff) | |
download | Ninja-4bd8db1fa8287ec0b828e98a7d2bcdf3d6b1904f.zip Ninja-4bd8db1fa8287ec0b828e98a7d2bcdf3d6b1904f.tar.gz Ninja-4bd8db1fa8287ec0b828e98a7d2bcdf3d6b1904f.tar.bz2 |
Add test and fix priority bug
AddTarget cannot add edges to the ready queue before the critical time
has been computed.
Diffstat (limited to 'src/build.h')
-rw-r--r-- | src/build.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/build.h b/src/build.h index 0d7c01a..7719d9a 100644 --- a/src/build.h +++ b/src/build.h @@ -74,7 +74,9 @@ struct Plan { /// Reset state. Clears want and ready sets. void Reset(); - void ComputeCriticalTime(BuildLog* build_log); + + // After all targets have been added, prepares the ready queue for find work. + void PrepareQueue(BuildLog* build_log); /// Update the build plan to account for modifications made to the graph /// by information loaded from a dyndep file. @@ -95,11 +97,16 @@ struct Plan { }; private: + void ComputeCriticalTime(BuildLog* build_log); bool RefreshDyndepDependents(DependencyScan* scan, const Node* node, std::string* err); void UnmarkDependents(const Node* node, std::set<Node*>* dependents); bool AddSubTarget(const Node* node, const Node* dependent, std::string* err, std::set<Edge*>* dyndep_walk); + // Add edges that kWantToStart into the ready queue + // Must be called after ComputeCriticalTime and before FindWork + void ScheduleInitialEdges(); + /// Update plan with knowledge that the given node is up to date. /// If the node is a dyndep binding on any of its dependents, this /// loads dynamic dependencies from the node's path. |