[make][clang] Do not add unsupported warning flags

Currently, clang does not support the -Wno-nonnull-compare and
-Wmaybe-uninitialized warning flags so this adds lots of unknown warning
flag output for each compile job when not using GCC.
This commit adds a makefile macro to check for supported warning flags
and only adds them if the compiler actually supports them.
This commit is contained in:
Alex Richardson
2021-12-09 10:59:09 +00:00
committed by Travis Geiselbrecht
parent 06a206f44e
commit 231f58903b
3 changed files with 36 additions and 13 deletions

View File

@@ -2,7 +2,10 @@ LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
MODULE_CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-double-promotion -Wno-maybe-uninitialized
MODULE_CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-double-promotion
ifeq ($(call is_warning_flag_supported,-Wmaybe-uninitialized),yes)
MODULE_CFLAGS += -Wno-maybe-uninitialized
endif
MODULE_OPTIONS := float
MODULE_SRCS += \