<div dir="ltr">I'm in favor of something like this. But, I think one important point to take account of is the interplay between the configuration selection and the effective triple.<div><br>E.g., let's say you have a linux distro that supports both "i386-linux-gnu" and "x86_64-linux-gnu". The typical way that users request the former target is via "$CC -m32". If you want a configuration option specific to "i386-linux-gnu", how do you accomplish that, in a way that works with the use of "-m32"?</div><div><br></div><div>It had been discussed previously that perhaps configuration options should be applied at two levels:</div><div>1) Add options based on a configuration name.</div><div>2) After adding those options, add more options based on the combination of (config name, effective triple). That is: using the result of "computeTargetTriple(Triple, Args)".</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 19, 2016 at 6:15 AM, David Chisnall 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"><span class="">On 19 Sep 2016, at 11:05, Renato Golin via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> * If Clang uses the option "--config foo.cfg", *replace* any other,<br>
> with reverse search patch (first local dir, then ~/.llvm, then<br>
> /etc/llvm)<br>
> * Allow the user to omit the ".cfg" extension, or not even create it<br>
> in the first place (I prefer it that way, see below)<br>
> * Clang -v and -### to show which configuration it's using (full path)<br>
<br>
</span>I’d also add:<br>
<br>
I’d like to see {foo}-clang interpreted as equivalent to clang --config {foo}.  We currently understand {triple}-clang, but this isn’t enough to describe most cross-compile toolchains.  I’d love to be able to drop a sysroot (maybe a cross-linker) and a config file in a system with a working clang and have cross compilation.<br>
<br>
We should also probably automatically silence unused options from config files.  For example, if my cross-compile toolchain passes some extra linker arguments with -Wl,-foo, then I don’t want every single line in my build to complain that -Wl is unused in conjunction with -c.<br>
<br>
David<br>
<br>
<br>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>