Have all targets in build.ninja

We should pass --gen_all_targets to have targets which are not declared
as .PHONY.  However, this triggers some nasty behavior inherited from
make, where targets can get variables from things that depend on them.
--gen_all_targets will traverse the targets starting at random points in
the dependency tree, and any variables set higher in the tree will not
be visible.  To work around this, keep --gen_all_phony_targets, which
will start traversing at the phony targets first.  This will enter the
tree traversal at points we know don't use inherited variables, like
checkbuild or the PARSE_TIME_MAKE_GOALS, and will reach all the
dependencies that use inherited variables in the right order.
--gen_all_targets will then fill in any remaining targets that were not
in the main dependency tree, and hopefully none of them use any
inherited variables.

Bug: 24384320
Change-Id: I1ff07b7ef26e9481baae678e7fe0933b6d05f2a7
1 file changed