Implement subninja chdir building
This CL implements the rest of subninja chdir:
1. Edge now supports subninja chdir. All Edge instances are tracked
in the singleton State, uniquely identified by their GlobalPath()
(see Scope::GlobalPath())
2. Node support as well. Node::globalPath() replaces
Node::path_hashed(). Node::path() is renamed to Node::rpath()
while this CL is in-progress; but before submitting, it
should be renamed back to Node::path(). (Same for Node::path_)
It's just convenient to have the compiler flag any use of
the old path() and path_ for review.
3. Variables do not change. Within the same Scope, variables are
evaluated just like they always were. No variable is allowed
to leak across a parent -> child subninja chdir.
4. depfiles and rspfiles' contents should not change. If a
depfile or rspfile is read or written from within a subninja
chdir, the paths in it should be transparently converted to
the Scope::GlobalPath().
5. Edge::EvaluateCommand() will generate commands in a chdir.
6. WIN32 build special cases.
Change-Id: I1bb4ae947353354533c3755df43698f00a3f2cf0
35 files changed