autotools: move -W flags to configure detection

This lets us use the flags with clang, and to add more flags easily.

Change-Id: I51bb53ffd5ab6da769cdfb422a2c88442f1ff9ad
Reviewed-on: https://chromium-review.googlesource.com/441864
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
Mike Frysinger 2017-02-06 15:10:13 -05:00
parent 8ba59492ab
commit 6cc037526e
9 changed files with 449 additions and 74 deletions

View file

@ -43,18 +43,7 @@ AM_CXXFLAGS += -I$(top_srcdir)/src/common/android/include
AM_CXXFLAGS += -I$(top_srcdir)/src/common/android/testing/include
endif
if GCC
# These are good warnings to be treated as errors
AM_CXXFLAGS += \
-Werror \
-Werror=missing-braces \
-Werror=non-virtual-dtor \
-Werror=overloaded-virtual \
-Werror=reorder \
-Werror=sign-compare \
-Werror=unused-variable \
-Werror=vla
endif
AM_CXXFLAGS += $(WARN_CXXFLAGS)
if LINUX_HOST
# Build as PIC on Linux, for linux_client_unittest_shlib