summaryrefslogtreecommitdiffstats
path: root/src/browse.cc
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2016-03-07 21:37:11 (GMT)
committerColin Cross <ccross@android.com>2016-04-19 20:34:16 (GMT)
commitbff4010e561b7d5f366262ef3d1415dcd50a3d94 (patch)
tree99c4675151f594f9182629871916b2adaf2a3946 /src/browse.cc
parentbfe8cd9b34d117201ffecd639e4b694f18648242 (diff)
downloadNinja-bff4010e561b7d5f366262ef3d1415dcd50a3d94.zip
Ninja-bff4010e561b7d5f366262ef3d1415dcd50a3d94.tar.gz
Ninja-bff4010e561b7d5f366262ef3d1415dcd50a3d94.tar.bz2
Pass location of build.ninja file to browse script
Pass the value of -f to the browse python script so it can be passed back to ninja -t query.
Diffstat (limited to 'src/browse.cc')
-rw-r--r--src/browse.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/browse.cc b/src/browse.cc
index 46434d7..14900f8 100644
--- a/src/browse.cc
+++ b/src/browse.cc
@@ -22,7 +22,7 @@
#include "build/browse_py.h"
void RunBrowsePython(State* state, const char* ninja_command,
- int argc, char* argv[]) {
+ const char* input_file, int argc, char* argv[]) {
// Fork off a Python process and have it run our code via its stdin.
// (Actually the Python process becomes the parent.)
int pipefd[2];
@@ -50,6 +50,8 @@ void RunBrowsePython(State* state, const char* ninja_command,
command.push_back("-");
command.push_back("--ninja-command");
command.push_back(ninja_command);
+ command.push_back("-f");
+ command.push_back(input_file);
for (int i = 0; i < argc; i++) {
command.push_back(argv[i]);
}