Skip to content

Commit

Permalink
windows: use CLParser to extract deps during build
Browse files Browse the repository at this point in the history
  • Loading branch information
evmar committed Apr 8, 2013
1 parent befa461 commit 1bda333
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "depfile_parser.h"
#include "disk_interface.h"
#include "graph.h"
#include "msvc_helper.h"
#include "state.h"
#include "subprocess.h"
#include "util.h"
Expand Down Expand Up @@ -864,6 +865,12 @@ bool Builder::ExtractDeps(CommandRunner::Result* result,
vector<Node*>* deps_nodes,
string* err) {
#ifdef _WIN32
CLParser parser;
result->output = parser.Parse(result->output);
for (set<string>::iterator i = parser.includes_.begin();
i != parser.includes_.end(); ++i) {
deps_nodes->push_back(state_->GetNode(*i));
}
#else
string depfile = result->edge->GetBinding("depfile");
if (depfile.empty())
Expand Down Expand Up @@ -894,5 +901,5 @@ bool Builder::ExtractDeps(CommandRunner::Result* result,
*/
#endif

return deps_nodes;
return true;
}

0 comments on commit 1bda333

Please sign in to comment.