[cfe-dev] Configuration files

James Y Knight via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 19 09:07:15 PDT 2016

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.

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"?

It had been discussed previously that perhaps configuration options should
be applied at two levels:
1) Add options based on a configuration name.
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)".

On Mon, Sep 19, 2016 at 6:15 AM, David Chisnall via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> On 19 Sep 2016, at 11:05, Renato Golin via cfe-dev <cfe-dev at lists.llvm.org>
> wrote:
> >
> > * If Clang uses the option "--config foo.cfg", *replace* any other,
> > with reverse search patch (first local dir, then ~/.llvm, then
> > /etc/llvm)
> > * Allow the user to omit the ".cfg" extension, or not even create it
> > in the first place (I prefer it that way, see below)
> > * Clang -v and -### to show which configuration it's using (full path)
> I’d also add:
> 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.
> 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.
> David
> _______________________________________________
> 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/20160919/a52efc17/attachment.html>

More information about the cfe-dev mailing list