Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: tools/gn/function_exec_script.cc

Issue 1721883002: gn/win: Don't strip trailing = on exec_script arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_exec_script.cc
diff --git a/tools/gn/function_exec_script.cc b/tools/gn/function_exec_script.cc
index d5e66ae78cbceecc1fa49a2777df6c1713ac1404..4da361e82aadb25fa6f698e75c9d4cee766d85da 100644
--- a/tools/gn/function_exec_script.cc
+++ b/tools/gn/function_exec_script.cc
@@ -171,8 +171,15 @@ Value RunExecScript(Scope* scope,
// Make the command line.
const base::FilePath& python_path = build_settings->python_path();
base::CommandLine cmdline(python_path);
+
+ // Opt out of CommandLine's parameter processing, which reformats switches
+ // and so on. For GN, arguments should be passed on exactly like they are
+ // in the .gn file.
+ cmdline.AppendArg("--");
brettw 2016/02/22 22:32:45 I'm confused, won't this pass "--" to Python as we
Nico 2016/02/22 22:58:05 base/command_kind.cc filters out the first -- para
brettw 2016/02/22 23:00:35 Weird, base::CommandLine is a disaster. Can you me
+
cmdline.AppendArgPath(script_path);
+
brettw 2016/02/22 22:32:45 Looks like you got an extra line in here.
Nico 2016/02/22 22:58:05 Will remove
if (args.size() >= 2) {
// Optional command-line arguments to the script.
const Value& script_args = args[1];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698