ccc: Change Command to take list of strings for argv instead of Arg
instances; this just complicated things and doesn't seem to provide
any benefit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61869 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index a8aab6c..83a814e 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -104,10 +104,10 @@
self.claim(hasHashHashHash)
for j in jobs.iterjobs():
if isinstance(j, Jobs.Command):
- print '"%s"' % '" "'.join(j.render(args))
+ print '"%s"' % '" "'.join(j.getArgv())
elif isinstance(j, Jobs.PipedJob):
for c in j.commands:
- print '"%s" %c' % ('" "'.join(c.render(args)),
+ print '"%s" %c' % ('" "'.join(c.getArgv()),
"| "[c is j.commands[-1]])
elif not isinstance(j, JobList):
raise ValueError,'Encountered unknown job.'
@@ -115,8 +115,7 @@
for j in jobs.iterjobs():
if isinstance(j, Jobs.Command):
- cmd_args = j.render(args)
- res = os.spawnvp(os.P_WAIT, cmd_args[0], cmd_args)
+ res = os.spawnvp(os.P_WAIT, j.executable, j.getArgv())
if res:
sys.exit(res)
elif isinstance(j, Jobs.PipedJob):
@@ -632,7 +631,8 @@
fd,filename = tempfile.mkstemp(suffix='.'+phase.type.tempSuffix)
output = Arguments.DerivedArg(filename)
- tool.constructJob(phase, arch, jobList, inputs, output, phase.type, forwardArgs)
+ tool.constructJob(phase, arch, jobList, inputs, output, phase.type,
+ forwardArgs, args)
return InputInfo(output, phase.type, baseInput)