From: Daniel Dunbar Date: Sun, 11 Jan 2009 22:03:55 +0000 (+0000) Subject: ccc: Print -### output on stderr to match gcc. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e99f9260d1eec79299a0d43723feec0596a1daff;p=clang ccc: Print -### output on stderr to match gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62052 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py index 53a4c22dc2..b9aba39f31 100644 --- a/tools/ccc/ccclib/Driver.py +++ b/tools/ccc/ccclib/Driver.py @@ -144,11 +144,11 @@ class Driver(object): self.claim(hasHashHashHash) for j in jobs.iterjobs(): if isinstance(j, Jobs.Command): - print '"%s"' % '" "'.join(j.getArgv()) + print >>sys.stderr, '"%s"' % '" "'.join(j.getArgv()) elif isinstance(j, Jobs.PipedJob): for c in j.commands: - print '"%s" %c' % ('" "'.join(c.getArgv()), - "| "[c is j.commands[-1]]) + print >>sys.stderr, '"%s" %c' % ('" "'.join(c.getArgv()), + "| "[c is j.commands[-1]]) elif not isinstance(j, JobList): raise ValueError,'Encountered unknown job.' sys.exit(0) @@ -308,6 +308,10 @@ class Driver(object): # that other code which needs to know the inputs # handles this properly. Best not to try and lipo # this, for example. + # + # FIXME: Actually, this is just flat out broken, the + # tools expect inputs to be accessible by .getValue + # but that of course only yields the argument. inputs.append((Types.ObjectType, a)) elif a.opt is self.parser.xOption: self.claim(a) diff --git a/tools/ccc/test/ccc/Xarch.c b/tools/ccc/test/ccc/Xarch.c index 55014a757c..06dae74d47 100644 --- a/tools/ccc/test/ccc/Xarch.c +++ b/tools/ccc/test/ccc/Xarch.c @@ -1,4 +1,4 @@ -// RUN: xcc -### -fsyntax-only -Xarch_i386 -Wall -Xarch_ppc -Wunused -arch i386 -arch ppc %s > %t && +// RUN: xcc -### -fsyntax-only -Xarch_i386 -Wall -Xarch_ppc -Wunused -arch i386 -arch ppc %s &> %t && // RUN: grep '"-Xarch"' %t | count 0 && // RUN: grep '"-Wall"' %t | count 1 && // RUN: grep '"-arch" "i386"' %t | count 1 && diff --git a/tools/ccc/test/ccc/integrated-cpp.c b/tools/ccc/test/ccc/integrated-cpp.c index 47508610d9..56c7764fdf 100644 --- a/tools/ccc/test/ccc/integrated-cpp.c +++ b/tools/ccc/test/ccc/integrated-cpp.c @@ -1,3 +1,3 @@ -// RUN: xcc -fsyntax-only -### %s | count 1 && -// RUN: xcc -fsyntax-only -### %s -no-integrated-cpp | count 2 && -// RUN: xcc -fsyntax-only -### %s -save-temps | count 2 +// RUN: xcc -fsyntax-only -### %s 2>&1 | count 1 && +// RUN: xcc -fsyntax-only -### %s -no-integrated-cpp 2>&1 | count 2 && +// RUN: xcc -fsyntax-only -### %s -save-temps 2>&1 | count 2