Fix GN command-line quoting on Windows. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/41263003 Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: ce7fea266dc81fb3fdaf207241772234de2ac4fd
diff --git a/tools/gn/ninja_build_writer.cc b/tools/gn/ninja_build_writer.cc index a6d6485..b7cfdd7 100644 --- a/tools/gn/ninja_build_writer.cc +++ b/tools/gn/ninja_build_writer.cc
@@ -51,6 +51,12 @@ EscapeOptions escape_shell; escape_shell.mode = ESCAPE_SHELL; +#if defined(OS_WIN) + // The command line code quoting varies by platform. We have one string, + // possibly with spaces, that we want to quote. The Windows command line + // quotes again, so we don't want quoting. The Posix one doesn't. + escape_shell.inhibit_quoting = true; +#endif const CommandLine& our_cmdline = *CommandLine::ForCurrentProcess(); const CommandLine::SwitchMap& switches = our_cmdline.GetSwitches();