diff options
author | Scott Graham <scottmg@chromium.org> | 2014-11-09 06:49:21 (GMT) |
---|---|---|
committer | Scott Graham <scottmg@chromium.org> | 2014-11-09 06:49:21 (GMT) |
commit | 559389de082406f44ae752a2494e53000d31a7df (patch) | |
tree | 3b82939a355ae91662c605b35e739e7f032db6e6 /src/graph.cc | |
parent | 8177085f4d3adf78b9709069a9c3ce5fe442867a (diff) | |
download | Ninja-559389de082406f44ae752a2494e53000d31a7df.zip Ninja-559389de082406f44ae752a2494e53000d31a7df.tar.gz Ninja-559389de082406f44ae752a2494e53000d31a7df.tar.bz2 |
remove CanonicalizePath overloads, test for toplevel behaviour
Diffstat (limited to 'src/graph.cc')
-rw-r--r-- | src/graph.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/graph.cc b/src/graph.cc index 5bc5c00..8666f50 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -391,6 +391,11 @@ bool ImplicitDepLoader::LoadDepFile(Edge* edge, const string& path, return false; } + unsigned int unused; + if (!CanonicalizePath(const_cast<char*>(depfile.out_.str_), + &depfile.out_.len_, err, &unused)) + return false; + // Check that this depfile matches the edge's output. Node* first_output = edge->outputs_[0]; StringPiece opath = StringPiece(first_output->path()); @@ -407,10 +412,12 @@ bool ImplicitDepLoader::LoadDepFile(Edge* edge, const string& path, // Add all its in-edges. for (vector<StringPiece>::iterator i = depfile.ins_.begin(); i != depfile.ins_.end(); ++i, ++implicit_dep) { - if (!CanonicalizePath(const_cast<char*>(i->str_), &i->len_, err)) + unsigned int slash_bits; + if (!CanonicalizePath(const_cast<char*>(i->str_), &i->len_, err, + &slash_bits)) return false; - Node* node = state_->GetNode(*i); + Node* node = state_->GetNode(*i, slash_bits); *implicit_dep = node; node->AddOutEdge(edge); CreatePhonyInEdge(node); |