diff --git a/Android.bp b/Android.bp index 7e2a5f9..55749f5 100644 --- a/Android.bp +++ b/Android.bp @@ -10,6 +10,7 @@ common_cflags = [ "-Wcast-align", "-Wcast-qual", "-Wwrite-strings", + "-Wno-constant-logical-operand", "-Werror", "-DH_MALLOC_PREFIX", "-DZERO_ON_FREE=true", diff --git a/Makefile b/Makefile index 24faedf..df2c6de 100644 --- a/Makefile +++ b/Makefile @@ -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,-Wcast-align=strict,-Wcast-align) -Wcast-qual -Wwrite-strings +ifeq ($(CC),clang) + SHARED_FLAGS += -Wno-constant-logical-operand +endif + ifeq ($(CONFIG_WERROR),true) SHARED_FLAGS += -Werror endif