[cfe-dev] Option -mtune

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Sun Apr 26 15:34:19 PDT 2020


On Sun, Apr 26, 2020 at 05:32:02PM -0500, David Greene via cfe-dev wrote:
> James Y Knight via cfe-dev <cfe-dev at lists.llvm.org> writes:
> 
> >> Honestly, the whole system needs an overhaul:
> >>
> >> http://clang-developers.42468.n3.nabble.com/Behavior-of-mcpu-td4064178.html
> >>
> >> I noticed this odd difference in behavior based on target.  In the end
> >> the answer was, "We want to behave like gcc," but that is not a very
> >> compelling argument to me.  Yes "-m" options are machine-specific, but
> >> giving the same option with the same name different behaviors is
> >> non-intuitive.
> >>
> >
> > As mentioned before, being compatible with GCC is a *huge* advantage for
> > clang. I agree that it's quite unfortunate that the march/mcpu/mtune set of
> > options are so divergent in behavior between targets.
> 
> But we're already incompatible because we require -target to do
> cross-compiling.  Yes, gcc is not natively a cross compiler so you have
> to do special builds for that so I understand why -target exists.

If you use the $triple-clang logic, no. -target is implicit in that
case.

Joerg


More information about the cfe-dev mailing list