You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and grab all -D and -I flags from that command. That works fairly well, but 2s of the 2.3s needed by this command is spent in ninja writing all commands to stdout and grep finding the one line I care about. (Not much faster if I > /dev/null instead of grep.)
With this proof-of-concept change in PrintCommands(), the time for this goes from 2.3s to 0.3s:
- if (!edge->is_phony())
- puts(edge->EvaluateCommand().c_str());
+ if (!edge->is_phony()) {
+ string cmd = edge->EvaluateCommand();
+ if (cmd.find("chrome/browser/ui/browser.cc") != string::npos)
+ puts(cmd.c_str());
+ }
This time is part of the time clang_complete spends after hitting the first '.' in a file, so getting it faster would be nice. I can't think of a good syntax for this though.
The text was updated successfully, but these errors were encountered:
It seems reasonable for commands to take an argument, which would constrain it to a command that produced a given output. Then you could use ninja -t commands foobar.cc^
That'd make sense to me, but it'd be backwards incompatible: -t commands already takes an argument and as far as I understand prints out all commands contained in that argument. That's probably useful in some situations too, so maybe there's need to be a way to pick between "all commands in the graph" and "just one leaf command"?
If I want to use the clang_complete plugin with chrome, I need to give it -D and -I flags for every file. One way to do this is to run
and grab all -D and -I flags from that command. That works fairly well, but 2s of the 2.3s needed by this command is spent in ninja writing all commands to stdout and grep finding the one line I care about. (Not much faster if I > /dev/null instead of grep.)
With this proof-of-concept change in PrintCommands(), the time for this goes from 2.3s to 0.3s:
This time is part of the time clang_complete spends after hitting the first '.' in a file, so getting it faster would be nice. I can't think of a good syntax for this though.
The text was updated successfully, but these errors were encountered: