Quote flags in GN. Previously cflags/ldflags/etc. were not automatically quoted by GN. The original intention was to support having multiple flags in one string which we don in GYP in some cases (e.g. "-foo -bar"). But this ends up not being necessary and we never do it. Furthermore, GN still escapes quote characters in these flags, making it impossible to manually quote them. The result is the old policy actively prevents using spaces or quotes in flags. This change automatically quotes flags like defines and file names already were. Review URL: https://codereview.chromium.org/1879723002 Cr-Original-Commit-Position: refs/heads/master@{#386490} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: d923cf82900e3c26ab4f989cff62bf2bd6c2810f
diff --git a/tools/gn/ninja_binary_target_writer.cc b/tools/gn/ninja_binary_target_writer.cc index eaae098..7077b17 100644 --- a/tools/gn/ninja_binary_target_writer.cc +++ b/tools/gn/ninja_binary_target_writer.cc
@@ -51,12 +51,6 @@ EscapeOptions GetFlagOptions() { EscapeOptions opts; opts.mode = ESCAPE_NINJA_COMMAND; - - // Some flag strings are actually multiple flags that expect to be just - // added to the command line. We assume that quoting is done by the - // buildfiles if it wants such things quoted. - opts.inhibit_quoting = true; - return opts; }