Lines Matching refs:command_line
26 def FindAndRemoveArgWithValue(command_line, argname): argument
32 if argname not in command_line:
34 location = command_line.index(argname)
35 value = command_line[location + 1]
36 command_line[location:location + 2] = []
40 def MergeSpacedArgs(command_line, argname): argument
44 while i < len(command_line):
45 arg = command_line[i]
47 result.append(arg + ' ' + command_line[i + 1])
55 def NormalizeSymbolArguments(command_line): argument
63 for x in command_line:
66 if not have_some_symbols and '-g0' in command_line:
67 command_line.remove('-g0')
70 if '-g2' in command_line:
71 command_line[command_line.index('-g2')] = '-g'
79 command_line = shlex.split(line.strip(), posix=not is_win)[1:]
81 output_name = FindAndRemoveArgWithValue(command_line, '-o')
82 dep_name = FindAndRemoveArgWithValue(command_line, '-MF')
84 NormalizeSymbolArguments(command_line)
86 command_line = MergeSpacedArgs(command_line, '-Xclang')
88 cc_file = [x for x in command_line if x.endswith('.cc') or
92 print 'Skipping %s' % command_line
97 rsp_file = [x for x in command_line if x.endswith('.rsp')]
102 command_line = shlex.split(open_rsp_file, posix=False)
104 defines = [x for x in command_line if x.startswith('-D')]
105 include_dirs = [x for x in command_line if x.startswith('-I')]
106 dash_f = [x for x in command_line if x.startswith('-f')]
108 [x for x in command_line if x.startswith('/wd' if is_win else '-W')]
109 others = [x for x in command_line if x not in defines and \
188 def Run(command_line): argument
190 return subprocess.check_output(command_line, shell=True)