am 46cb2ee3: Merge "Force some clang Werrors that *will* break things."

* commit '46cb2ee3cb120a1c03241e9e2aa66d76c890c486':
  Force some clang Werrors that *will* break things.
This commit is contained in:
Dan Albert 2015-06-12 19:59:13 +00:00 committed by Android Git Automerger
commit 2bb996f6a5
4 changed files with 19 additions and 4 deletions

View File

@ -40,6 +40,8 @@ my_shared_libraries := $(LOCAL_SHARED_LIBRARIES)
my_cflags := $(LOCAL_CFLAGS)
my_conlyflags := $(LOCAL_CONLYFLAGS)
my_cppflags := $(LOCAL_CPPFLAGS)
my_cflags_no_override := $(GLOBAL_CFLAGS_NO_OVERRIDE)
my_cppflags_no_override := $(GLOBAL_CPPFLAGS_NO_OVERRIDE)
my_ldflags := $(LOCAL_LDFLAGS)
my_ldlibs := $(LOCAL_LDLIBS)
my_asflags := $(LOCAL_ASFLAGS)
@ -1031,6 +1033,8 @@ ifeq ($(my_clang),true)
my_cflags += $(LOCAL_CLANG_CFLAGS)
my_conlyflags += $(LOCAL_CLANG_CONLYFLAGS)
my_cppflags += $(LOCAL_CLANG_CPPFLAGS)
my_cflags_no_override += $(GLOBAL_CLANG_CFLAGS_NO_OVERRIDE)
my_cppflags_no_override += $(GLOBAL_CLANG_CPPFLAGS_NO_OVERRIDE)
my_asflags += $(LOCAL_CLANG_ASFLAGS)
my_ldflags += $(LOCAL_CLANG_LDFLAGS)
my_cflags += $(LOCAL_CLANG_CFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CLANG_CFLAGS_$(my_32_64_bit_suffix))
@ -1055,6 +1059,8 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(my_asflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(my_conlyflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CFLAGS := $(my_cflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CPPFLAGS := $(my_cppflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CFLAGS_NO_OVERRIDE := $(my_cflags_no_override)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CPPFLAGS_NO_OVERRIDE := $(my_cppflags_no_override)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RTTI_FLAG := $(LOCAL_RTTI_FLAG)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEBUG_CFLAGS := $(debug_cflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_C_INCLUDES := $(my_c_includes)

View File

@ -117,10 +117,15 @@ COMMON_RELEASE_CFLAGS:= -DNDEBUG -UDEBUG
COMMON_GLOBAL_CPPFLAGS:= $(COMMON_GLOBAL_CFLAGS) -Wsign-promo -std=gnu++11
COMMON_RELEASE_CPPFLAGS:= $(COMMON_RELEASE_CFLAGS)
GLOBAL_CFLAGS_NO_OVERRIDE := \
GLOBAL_CFLAGS_NO_OVERRIDE := \
-Werror=int-to-pointer-cast \
-Werror=pointer-to-int-cast \
GLOBAL_CLANG_CFLAGS_NO_OVERRIDE := \
-Werror=address-of-temporary \
-Werror=null-dereference \
-Werror=return-type \
GLOBAL_CPPFLAGS_NO_OVERRIDE :=
# Set the extensions used for various packages

View File

@ -994,8 +994,8 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_CFLAGS) \
$(PRIVATE_CPPFLAGS) \
$(PRIVATE_DEBUG_CFLAGS) \
$(GLOBAL_CFLAGS_NO_OVERRIDE) \
$(GLOBAL_CPPFLAGS_NO_OVERRIDE) \
$(PRIVATE_CFLAGS_NO_OVERRIDE) \
$(PRIVATE_CPPFLAGS_NO_OVERRIDE) \
-MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
$(transform-d-to-p)
endef
@ -1032,7 +1032,7 @@ $(call transform-c-or-s-to-o-no-deps, \
$(PRIVATE_CFLAGS) \
$(PRIVATE_CONLYFLAGS) \
$(PRIVATE_DEBUG_CFLAGS) \
$(GLOBAL_CFLAGS_NO_OVERRIDE))
$(PRIVATE_CFLAGS_NO_OVERRIDE))
endef
define transform-s-to-o-no-deps
@ -1099,6 +1099,8 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_CFLAGS) \
$(PRIVATE_CPPFLAGS) \
$(PRIVATE_DEBUG_CFLAGS) \
$(PRIVATE_CFLAGS_NO_OVERRIDE) \
$(PRIVATE_CPPFLAGS_NO_OVERRIDE) \
-MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
$(transform-d-to-p)
endef
@ -1125,6 +1127,7 @@ $(hide) $(PRIVATE_CC) \
$(PRIVATE_HOST_GLOBAL_CONLYFLAGS) \
) \
$(1) \
$(PRIVATE_CFLAGS_NO_OVERRIDE) \
-MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
endef

View File

@ -270,6 +270,7 @@ _product_stash_var_list += \
_product_stash_var_list += \
GLOBAL_CFLAGS_NO_OVERRIDE \
GLOBAL_CPPFLAGS_NO_OVERRIDE \
GLOBAL_CLANG_CFLAGS_NO_OVERRIDE \
#
# Stash values of the variables in _product_stash_var_list.