You're right, I've failed to preserve the behaviour. I've uploaded a new version of the patch.
I don't suppose you know if that "don't check CPU" behaviour is correct? The effect seems to be - Non-Darwin: Arch for cpu specified with -mcpu takes precendence over arch specified by -arch/-march Darwin: Arch specified with -arch/-march takes precendence over arch specified by -mcpu Though it's perhaps better described by the unit test. > -----Original Message----- > From: Tim Northover [mailto:[email protected]] > Sent: 22 November 2013 12:18 > To: Bernard Ogden > Cc: [email protected]; [email protected]; > [email protected]; Amara Emerson > Subject: Re: [PATCH] Refactor duplicate functions > > > Hi Bernie, > > Thanks very much for taking a stab at this. I'm quite happy with the > "arm" namespace myself, but have a reservation about Darwin: > > > ================ > Comment at: lib/Driver/ToolChain.cpp:167-169 > @@ -166,5 @@ > - const llvm::Triple &Triple) { > - // For Darwin targets, the -arch option (which is translated to a > - // corresponding -march option) should determine the architecture > - // (and the Mach-O slice) regardless of any -mcpu options. > - if (!Triple.isOSDarwin()) { > ---------------- > It's a little difficult to tell because the patch no longer applies > cleanly to trunk, but I suspect this comment has misled you. Darwin > *does* take note of -mcpu, and I suspect this patch might disable that. > > > http://llvm-reviews.chandlerc.com/D2243 > > ARCANIST PROJECT > clang _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
