<div dir="ltr">Yep, sounds good.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 12, 2016 at 4:55 PM, Vedant Kumar via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi cfe-dev,<br>
<br>
The clang driver uses "default" and "effective" target triples in a rather ad<br>
hoc way. Cleaning this up would have a few benefits:<br>
<br>
- Better error reporting. We have a few open bugs about error messages<br>
derived from default target triples, instead of more specific ones.<br>
<br>
- Less waste. Effective triples are needlessly recomputed in several<br>
different parts of the driver. This just needs to happen once per job.<br>
<br>
- Less confusion about which kind of triple to use in a given context. It<br>
should basically always be easy to use an effective triple.<br>
<br>
We can't do away with default triples entirely. They appear to be needed to get<br>
ToolChains. Once a ToolChain is available, we can get effective triples.<br>
<br>
My plan is to remove uses of default triples in the driver until they are<br>
*only* needed to compute effective triples. I don't know if this goal is<br>
realistic, but I still expect incremental progress towards it to be beneficial.<br>
<br>
What do people think of this plan?<br>
<br>
best,<br>
vedant<br>
<br>
p.s:<br>
<br>
To make this a bit more concrete, here are some initial patches:<br>
<br>
<a href="http://reviews.llvm.org/D22289" rel="noreferrer" target="_blank">http://reviews.llvm.org/D22289</a> [Driver] Make Driver::DefaultTargetTriple private (NFCI)<br>
<a href="http://reviews.llvm.org/D22290" rel="noreferrer" target="_blank">http://reviews.llvm.org/D22290</a> [Driver] Compute effective target triples once per job (NFCI)<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>