[cfe-dev] Lessening the driver's reliance on default target triples

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Thu Jul 14 08:13:34 PDT 2016


Yep, sounds good.

On Tue, Jul 12, 2016 at 4:55 PM, Vedant Kumar via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi cfe-dev,
>
> The clang driver uses "default" and "effective" target triples in a rather
> ad
> hoc way. Cleaning this up would have a few benefits:
>
>   - Better error reporting. We have a few open bugs about error messages
>     derived from default target triples, instead of more specific ones.
>
>   - Less waste. Effective triples are needlessly recomputed in several
>     different parts of the driver. This just needs to happen once per job.
>
>   - Less confusion about which kind of triple to use in a given context. It
>     should basically always be easy to use an effective triple.
>
> We can't do away with default triples entirely. They appear to be needed
> to get
> ToolChains. Once a ToolChain is available, we can get effective triples.
>
> My plan is to remove uses of default triples in the driver until they are
> *only* needed to compute effective triples. I don't know if this goal is
> realistic, but I still expect incremental progress towards it to be
> beneficial.
>
> What do people think of this plan?
>
> best,
> vedant
>
> p.s:
>
> To make this a bit more concrete, here are some initial patches:
>
>   http://reviews.llvm.org/D22289 [Driver] Make
> Driver::DefaultTargetTriple private (NFCI)
>   http://reviews.llvm.org/D22290 [Driver] Compute effective target
> triples once per job (NFCI)
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160714/d6b79014/attachment.html>


More information about the cfe-dev mailing list