Lines Matching refs:command_line
24 def FindAndRemoveArgWithValue(command_line, argname):
28 Modifies |command_line| in place.
30 if argname not in command_line:
32 location = command_line.index(argname)
33 value = command_line[location + 1]
34 command_line[location:location + 2] = []
38 def MergeSpacedArgs(command_line, argname):
42 while i < len(command_line):
43 arg = command_line[i]
45 result.append(arg + ' ' + command_line[i + 1])
53 def NormalizeSymbolArguments(command_line):
57 Modifies |command_line| in place.
61 for x in command_line:
64 if not have_some_symbols and '-g0' in command_line:
65 command_line.remove('-g0')
68 if '-g2' in command_line:
69 command_line[index('-g2')] = '-g'
80 command_line = shlex.split(line.strip())[1:]
82 output_name = FindAndRemoveArgWithValue(command_line, '-o')
83 dep_name = FindAndRemoveArgWithValue(command_line, '-MF')
85 NormalizeSymbolArguments(command_line)
87 command_line = MergeSpacedArgs(command_line, '-Xclang')
89 defines = [x for x in command_line if x.startswith('-D')]
90 include_dirs = [x for x in command_line if x.startswith('-I')]
91 dash_f = [x for x in command_line if x.startswith('-f')]
92 warnings = [x for x in command_line if x.startswith('-W')]
93 cc_file = [x for x in command_line if x.endswith('.cc') or
97 print 'Skipping %s' % command_line
100 others = [x for x in command_line if x not in defines and \
166 def Run(command_line):
167 """Run |command_line| as a subprocess and return stdout. Raises on error."""
168 return subprocess.check_output(command_line, shell=True)