disable annoying Clang warning from avoiding ifdef

This commit is contained in:
Daniel Micay 2020-04-30 16:36:47 -04:00
parent b672316bc7
commit cf55ac0f6d
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ common_cflags = [
"-Wcast-align", "-Wcast-align",
"-Wcast-qual", "-Wcast-qual",
"-Wwrite-strings", "-Wwrite-strings",
"-Wno-constant-logical-operand",
"-Werror", "-Werror",
"-DH_MALLOC_PREFIX", "-DH_MALLOC_PREFIX",
"-DZERO_ON_FREE=true", "-DZERO_ON_FREE=true",

View File

@ -30,6 +30,10 @@ SHARED_FLAGS := -O3 -flto -fPIC -fvisibility=hidden $(call safe_flag,-fno-plt) \
$(call safe_flag,-fstack-clash-protection) -fstack-protector-strong -pipe -Wall -Wextra \ $(call safe_flag,-fstack-clash-protection) -fstack-protector-strong -pipe -Wall -Wextra \
$(call safe_flag,-Wcast-align=strict,-Wcast-align) -Wcast-qual -Wwrite-strings $(call safe_flag,-Wcast-align=strict,-Wcast-align) -Wcast-qual -Wwrite-strings
ifeq ($(CC),clang)
SHARED_FLAGS += -Wno-constant-logical-operand
endif
ifeq ($(CONFIG_WERROR),true) ifeq ($(CONFIG_WERROR),true)
SHARED_FLAGS += -Werror SHARED_FLAGS += -Werror
endif endif