Henning Thielemann via llvm-dev
2016-Aug-15 08:54 UTC
[llvm-dev] llvm-config-3.8.1 --cflags added -pedantic
When switching from LLVM-3.8 to LLVM-3.8.1 (I use the Ubuntu packages) I got a lot of warnings when compiling my code. It seems that that `llvm-config --cflags` added e.g. the -pedantic flag. The pedantic flag seems to remain in llvm-config-3.9. I wonder whether it is the business of llvm-config to choose my compiler warnings. Was this change intended and with what reasons? Btw. the switch from llvm-3.8 to llvm-3.8.1 also removed include/llvm/Config/config.h without previous deprecation. I think it is a bad idea to do this in a bugfix release. I was always uncertain whether I should include config.h or llvm-config.h and it seems I chose the wrong one (namely config.h).
Justin Bogner via llvm-dev
2016-Aug-15 16:45 UTC
[llvm-dev] llvm-config-3.8.1 --cflags added -pedantic
Henning Thielemann via llvm-dev <llvm-dev at lists.llvm.org> writes:> When switching from LLVM-3.8 to LLVM-3.8.1 (I use the Ubuntu packages) > I got a lot of warnings when compiling my code. It seems that that > `llvm-config --cflags` added e.g. the -pedantic flag. The pedantic > flag seems to remain in llvm-config-3.9. I wonder whether it is the > business of llvm-config to choose my compiler warnings. Was this > change intended and with what reasons?This seems kind of bad, but I don't think it's a new problem. I'm pretty sure llvm-config --cflags has always leaked the warning flags that llvm happened to be built with. ISTR a discussion about changing this to a more specific set of flags to pass through a while back, but I guess it didn't result in anything.> Btw. the switch from llvm-3.8 to llvm-3.8.1 also removed > include/llvm/Config/config.h without previous deprecation. I think it > is a bad idea to do this in a bugfix release. I was always uncertain > whether I should include config.h or llvm-config.h and it seems I > chose the wrong one (namely config.h).The change to stop installing the internal config.h header happened in 2014, in r210766, so I would have expected this to have been gone since llvm 3.5 at the latest. Maybe the configure and cmake builds behaved differently here, and the ubuntu packaging switched build systems?