diff options
author | scottmg <scottmg@chromium.org> | 2014-09-18 14:45:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-18 21:46:24 +0000 |
commit | 8034e1d4dc0524ef8477e475b771c4b080e6dce2 (patch) | |
tree | 92db74d7ebd2d027251f2770f2605819dbe66e5c /tools/gn/bin | |
parent | 1083f7edba5e4f4b08bc4d238e0787cfe24cd632 (diff) | |
download | chromium_src-8034e1d4dc0524ef8477e475b771c4b080e6dce2.zip chromium_src-8034e1d4dc0524ef8477e475b771c4b080e6dce2.tar.gz chromium_src-8034e1d4dc0524ef8477e475b771c4b080e6dce2.tar.bz2 |
gn: gyp_flag_compare.py de-escape command line properly
Makes some Skia flags be matched properly.
e.g.
'-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"'
vs
-DGR_GL_CUSTOM_SETUP_HEADER=\"GrGLConfig_chrome.h\"
Diffs 393202 -> 374424.
It does make the script quite a bit slower unfortunately, I guess the
regular split is native C.
BUG=335824
Review URL: https://codereview.chromium.org/580213003
Cr-Commit-Position: refs/heads/master@{#295562}
Diffstat (limited to 'tools/gn/bin')
-rwxr-xr-x | tools/gn/bin/gyp_flag_compare.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gn/bin/gyp_flag_compare.py b/tools/gn/bin/gyp_flag_compare.py index aa5bcf9..1af3aae 100755 --- a/tools/gn/bin/gyp_flag_compare.py +++ b/tools/gn/bin/gyp_flag_compare.py @@ -9,6 +9,7 @@ build, report on differences between the command lines.""" import os +import shlex import subprocess import sys @@ -76,8 +77,7 @@ def GetFlags(lines): if 'clang' not in line: continue - # TODO(scottmg): Proper escapes. - command_line = line.strip().split()[1:] + command_line = shlex.split(line.strip())[1:] output_name = FindAndRemoveArgWithValue(command_line, '-o') dep_name = FindAndRemoveArgWithValue(command_line, '-MF') |