@@ -19,6 +19,9 @@ struct node {
1919 struct edge * gen , * * use ;
2020 size_t nuse ;
2121
22+ /* dyndep or NULL if the node is not a dyndep */
23+ struct dyndep * dyndep ;
24+
2225 /* command hash used to build this output, read from build log */
2326 uint64_t hash ;
2427
@@ -39,10 +42,13 @@ struct edge {
3942 struct node * * out , * * in ;
4043 size_t nout , nin ;
4144
42- /* index of first implicit output */
43- size_t outimpidx ;
44- /* index of first implicit and order-only input */
45- size_t inimpidx , inorderidx ;
45+ /* dyndep or NULL if the edge has no dyndep */
46+ struct dyndep * dyndep ;
47+
48+ /* index of first implicit adn dyndep output */
49+ size_t outimpidx , outdynidx ;
50+ /* index of first implicit, dyndep and order-only input */
51+ size_t inimpidx , indynidx , inorderidx ;
4652
4753 /* command hash */
4854 uint64_t hash ;
@@ -60,6 +66,7 @@ struct edge {
6066 FLAG_DIRTY = FLAG_DIRTY_IN | FLAG_DIRTY_OUT ,
6167 FLAG_CYCLE = 1 << 5 , /* used for cycle detection */
6268 FLAG_DEPS = 1 << 6 , /* dependencies loaded */
69+ FLAG_DYNDEP = 1 << 7 , /* dyndep loaded */
6370 } flags ;
6471
6572 /* used to coordinate ready work in build() */
@@ -87,6 +94,10 @@ struct edge *mkedge(struct environment *parent);
8794void edgehash (struct edge * );
8895/* add dependencies from $depfile or .ninja_deps as implicit inputs */
8996void edgeadddeps (struct edge * e , struct node * * deps , size_t ndeps );
97+ /* add dependencies from dyndep files as implicit inputs */
98+ void edgeadddyndeps (struct edge * e , struct node * * deps , size_t ndeps );
99+ /* add outputs from dyndep as implicit outputs */
100+ void edgeadddynouts (struct edge * e , struct node * * outs , size_t nouts );
90101
91102/* a single linked list of all edges, valid up until build() */
92103extern struct edge * alledges ;
0 commit comments