[PATCH] D24933: Enable configuration files in clang
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 1 13:35:36 PDT 2016
hans added a comment.
I didn't follow the original thread too closely as I didn't really see the problem this was trying to address, but since I'm now cc'd I'll add my opinion.
I'm not in favour of this functionality. (But I guess I might be missing the main use case.)
The way I see it, what flags to pass to the compiler should be configured in a project's build system. If a project wants to disable some warnings by default, add it to the Makefile (or equivalent). I don't see the point in checking in another file next to it.
The idea of having the compiler search for config files in random places on the filesystem seems scary to me. If I want to override a project's compile flags, I'd like to pass them in when configuring the build. If I don't pass any flags, I want Clang to work the same everywhere.
Bundling up compiler flags in a file can be convenient, but we already have `@file` for that.
There is already a lot of magic in the driver to figure out how to invoke the tools. I fear that this would make things even more complicated.
More information about the cfe-commits