The basic problem of dependencies loading is: for a given build rule,
quickly look up the set of header files it depends on.
The strangely hard part is coming up with a unique ID for the rule!
When each build rule references its own "foo.o.d" deps file, it's easy
to map that to a path and the data in the path. When we eliminated
these separate deps files, we no longer had an easy key to look up the
data from, so in the depslog database I went with the single output
file path as the key.
This is why it doesn't work with multiple outputs. It was a bad
design, I am sorry. My only excuse is that I picked it knowing that
we could change it later.
Some options to fix this:
- make the key instead be the *set* of output files
- require build rules with multiple outputs to specify some sort of
key (could even reuse the "depfile" string perhaps)
Here are some docs on the dependency log format:
https://github.com/ninja-build/ninja/blob/master/src/deps_log.h#L29
The first of those options, where the key be a set of outputs is
appealing from a user standpoint, but a bit hard to implement because
the format is designed to be dense, where we only have 32 bits for the
key. I can imagine schemes (all problems can be solved using another
layer of indirection) but they'd be some work. It wasn't clear if you
were volunteering to fix it... :)
> --
> You received this message because you are subscribed to the Google Groups
> "ninja-build" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
ninja-build...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.