diff options
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r-- | Makefile.toolchain | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain index a79f248ea2..a56193201a 100644 --- a/Makefile.toolchain +++ b/Makefile.toolchain @@ -59,15 +59,19 @@ GCOV=$(CROSS_COMPILE)gcov HOSTGCOV=$(CURDIR)/util/llvm-gcov.sh C_WARN = -Wstrict-prototypes -Wdeclaration-after-statement -Wno-pointer-sign -COMMON_WARN = -Wall -Wundef -Werror -Werror-implicit-function-declaration \ +COMMON_WARN = -Wall -Wundef -Werror-implicit-function-declaration \ -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member \ -fno-common -fno-strict-aliasing -fno-strict-overflow + +ifndef ALLOW_WARNINGS +COMMON_WARN+=-Werror ifeq ($(cc-name),clang) COMMON_WARN+=-Werror=uninitialized endif ifeq ($(cc-name),gcc) COMMON_WARN+=-Werror=maybe-uninitialized endif +endif ifeq ($(cc-name),clang) # TODO(b/172020503): Re-enabling this warning requires a large CL. |