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

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


mehdi_amini added a comment.

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

> 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.


Note that we have a disjoint set of host environments,  for me `ninja check-mlir` does not produce any warning locally and passes with `-DLLVM_ENABLE_WERROR=ON` (using clang-10 on Linux), but that does not mean it'll work for everyone else. Me building with Werror won't guarantee that your environment will be warning free.

Patches are welcome to fix warnings everywhere though if you encounter some! Folks have been sending patches to MLIR to fix warnings that they see on their platforms (Windows frequently, but also other Unix systems than Linux).

Looking at one clang invocation, these flags are used for me when building LLVM right now FYI: ` -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -fvisibility=hidden -fno-exceptions -fno-rtti -UNDEBUG -std=c++14`


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