[cfe-dev] Configuration files

Serge Pavlov via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 28 05:57:19 PDT 2016


2016-09-28 16:13 GMT+07:00 Joerg Sonnenberger via cfe-dev <
cfe-dev at lists.llvm.org>:

> On Wed, Sep 28, 2016 at 01:39:59PM +0700, Serge Pavlov via cfe-dev wrote:
> > This feature addresses at least two different use cases:
> >
> > 1. Config file as a way to override compiler defaults.
> >
> > Compiler already has some default settings and it is hardly possible to
> > find the settings that suit everybody. For instance, the warning
> > -Wundefined-var-template
> > is helpful for some users but annoys others. With config file a user
> could
> > put new defaults there and thus customize the compiler. No changes to
> build
> > script is required. Note, this scenario requires just default config
> files.
>
> This is *exactly* why I am *strongly* against this. Yes, users do that.
> Afterwards, they start to fill random bug reports against projects that
> break, because the invocation includes -Werror. This is even worse than
> setting a global CFLAGS or CXXFLAGS variable since the expansion of
> those are at least generally visible. Hidden user-modifable sources of
> flags are a support nightware.
>
>
Users are of different categories. What you say is true for end users, who
just use
compiler as a tool. But there are other users, who develop clang based SDKs
for
these end users. They would use this feature with more care because support
problems
would be their problems. Otherwise such user may want to turn off unwanted
warnings by
modifying compiler sources, this is much worse case.


> I dare to say that ICC tends to be used in a much more limited
> environment. If you want to allow magic environmental variables in your
> build script that are invisible for the casual observer, it is not
> difficult to add. Well written build systems already support that
> anyway.
>

Environment variable is just another way to specify configuration file, it
does not
need modification of build scripts. Convenient for experiments. If we
support config
file in any form, there is no additional danger to allow setting up
configuration via
environmental variables. It cannot add any option automatically.

Thanks,
--Serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160928/18760353/attachment.html>


More information about the cfe-dev mailing list