On Wed, Jun 19, 2013 at 5:51 PM, Reid Kleckner <[email protected]> wrote: > On Wed, Jun 19, 2013 at 1:19 PM, Charles Davis <[email protected]> wrote: >> >> >> On Jun 19, 2013, at 9:09 AM, Reid Kleckner wrote: >> >> > Author: rnk >> > Date: Wed Jun 19 10:09:06 2013 >> > New Revision: 184308 >> > >> > URL: http://llvm.org/viewvc/llvm-project?rev=184308&view=rev >> > Log: >> > [Driver] Don't forward source file input args to gcc >> > >> > gcc's inputs are already added by the InputInfoList passed to >> > Action::ConstructJob. >> > >> > Fixes a regression from r183989. This was manifesting when targetting >> > mingw as an extra input argument to gcc when assembling. It presumably >> > affects other situations where clang calls gcc. >> > >> > Prior to r183989, forwardToGCC() was returning false because the INPUT >> > option defined in OptParser.td had the DriverOption flag set on it. >> > LLVM's Option library does not set this flag for INPUT. >> > >> > Reviewers: espindola >> > >> > Differential Revision: http://llvm-reviews.chandlerc.com/D999 >> > >> > Modified: >> > cfe/trunk/lib/Driver/Tools.cpp >> > cfe/trunk/test/Driver/no-integrated-as-win.c >> > >> > Modified: cfe/trunk/lib/Driver/Tools.cpp >> > URL: >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=184308&r1=184307&r2=184308&view=diff >> > >> > ============================================================================== >> > --- cfe/trunk/lib/Driver/Tools.cpp (original) >> > +++ cfe/trunk/lib/Driver/Tools.cpp Wed Jun 19 10:09:06 2013 >> > @@ -225,7 +225,10 @@ static void addProfileRT(const ToolChain >> > } >> > >> > static bool forwardToGCC(const Option &O) { >> > - return !O.hasFlag(options::NoForward) && >> > + // Don't forward inputs from the original command line. They are >> > added from >> > + // InputInfoList. >> > + return !O.getKind() == Option::InputClass && >> Did you mean: >> >> return O.getKind() != Option::InputClass && >> ^ >> >> ? Am I the only one who noticed this? > > > No, someone else mailed me about this off list. If someone can fix it > quick, please do, it's not convenient for me right now.
Fixed in r184391. > >> >> How are the tests even passing with this? > > > There's only one driver test that exercises this, which I just added. It's > loose because I was trying to solve a problem of too many args, not too few. > I can beef it up tomorrow. > >> >> And why didn't Clang warn on this for you? (Want me to file a bug?) > > > As Matt said, we have the warning, but it must not be on. I don't have > clang self-hosting on Windows, but a bot could've told me about it. > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
