Commit 8034e1d4 authored by scottmg's avatar scottmg Committed by Commit bot

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}
parent 1083f7ed
...@@ -9,6 +9,7 @@ build, report on differences between the command lines.""" ...@@ -9,6 +9,7 @@ build, report on differences between the command lines."""
import os import os
import shlex
import subprocess import subprocess
import sys import sys
...@@ -76,8 +77,7 @@ def GetFlags(lines): ...@@ -76,8 +77,7 @@ def GetFlags(lines):
if 'clang' not in line: if 'clang' not in line:
continue continue
# TODO(scottmg): Proper escapes. command_line = shlex.split(line.strip())[1:]
command_line = line.strip().split()[1:]
output_name = FindAndRemoveArgWithValue(command_line, '-o') output_name = FindAndRemoveArgWithValue(command_line, '-o')
dep_name = FindAndRemoveArgWithValue(command_line, '-MF') dep_name = FindAndRemoveArgWithValue(command_line, '-MF')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment