[PATCH] D78306: [flang] Use LLVM's flags

David Truby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 14:00:13 PDT 2020


DavidTruby added a comment.

In D78306#2018686 <https://reviews.llvm.org/D78306#2018686>, @tskeith wrote:

> In D78306#2018333 <https://reviews.llvm.org/D78306#2018333>, @DavidTruby wrote:
>
> > In D78306#2018241 <https://reviews.llvm.org/D78306#2018241>, @tskeith wrote:
> >
> > > With this change is it possible to enable `-Werror` for flang (in an in-tree build) without enabling it for all of LLVM? Also, `-pedantic`?
> >
> >
> > Could you let us know why you think this is necessary when LLVM_ENABLE_WERROR and LLVM_ENABLE_PEDANTIC exist?
> >
> > It's perfectly acceptable to stand up build bots that enable these two flags and enforce that those build bots always pass in master; I just really don't think we want these flags by default when new compiler releases after our own releases (and therefore completely out of our control) can cause build failures with these flags.
>
>
> I want to make sure that my flang changes (and everyone else's) build without warnings from the compilers I test with. `LLVM_ENABLE_WERROR` etc. is fine if LLVM and MLIR don't have any warnings, but that hasn't been my experience.


I'm not opposed to adding a FLANG_ENABLE_WERROR and FLANG_ENABLE_PEDANTIC, there's even precedent for this in other LLVM projects. That way we could fine-tune which projects should have -Werror and -pedantic turned on and only enable it for those we care about. Then we can add BuildBots with these flags turned on for the compilers we test with to ensure all changes pass that.

What I'm opposed to is having this on by default; this is bad for users that just download the source of x release and find they can't build it with y compiler that came out after that release because of warnings promoted to errors.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78306/new/

https://reviews.llvm.org/D78306





More information about the llvm-commits mailing list