Strip my_clang on assignment.
There were a few cases that my_clang was being used without being stripped. This was causing uses like the following to fail because it would be partially applied (use clang as the compiler, but don't strip out incompatible cflags). LOCAL_CLANG := true # explanation To avoid this problem in the future, just strip my_clang when it is assigned. Change-Id: I41c2f36a4d4c3aa305a25b4a151c066dad5ffe0f
This commit is contained in:
parent
ce9b58b1e4
commit
db905e7b11
1 changed files with 6 additions and 6 deletions
|
@ -133,12 +133,12 @@ my_asflags += $(LOCAL_ASFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $
|
|||
my_c_includes += $(LOCAL_C_INCLUDES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_C_INCLUDES_$(my_32_64_bit_suffix))
|
||||
my_generated_sources += $(LOCAL_GENERATED_SOURCES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_GENERATED_SOURCES_$(my_32_64_bit_suffix))
|
||||
|
||||
my_clang := $(LOCAL_CLANG)
|
||||
my_clang := $(strip $(LOCAL_CLANG))
|
||||
ifdef LOCAL_CLANG_$(my_32_64_bit_suffix)
|
||||
my_clang := $(LOCAL_CLANG_$(my_32_64_bit_suffix))
|
||||
my_clang := $(strip $(LOCAL_CLANG_$(my_32_64_bit_suffix)))
|
||||
endif
|
||||
ifdef LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
|
||||
my_clang := $(LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
|
||||
my_clang := $(strip $(LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)))
|
||||
endif
|
||||
|
||||
# clang is enabled by default for host builds
|
||||
|
@ -312,7 +312,7 @@ else
|
|||
endif
|
||||
|
||||
ifeq ($(strip $(my_cc)),)
|
||||
ifeq ($(strip $(my_clang)),true)
|
||||
ifeq ($(my_clang),true)
|
||||
my_cc := $(CLANG)
|
||||
else
|
||||
my_cc := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)CC)
|
||||
|
@ -328,7 +328,7 @@ endif
|
|||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CC := $(my_cc)
|
||||
|
||||
ifeq ($(strip $(my_cxx)),)
|
||||
ifeq ($(strip $(my_clang)),true)
|
||||
ifeq ($(my_clang),true)
|
||||
my_cxx := $(CLANG_CXX)
|
||||
else
|
||||
my_cxx := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)CXX)
|
||||
|
@ -378,7 +378,7 @@ normal_objects_mode := $(if $(LOCAL_ARM_MODE),$(LOCAL_ARM_MODE),thumb)
|
|||
# actually used (although they are usually empty).
|
||||
arm_objects_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)$(arm_objects_mode)_CFLAGS)
|
||||
normal_objects_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)$(normal_objects_mode)_CFLAGS)
|
||||
ifeq ($(strip $(my_clang)),true)
|
||||
ifeq ($(my_clang),true)
|
||||
arm_objects_cflags := $(call $(LOCAL_2ND_ARCH_VAR_PREFIX)convert-to-$(my_host)clang-flags,$(arm_objects_cflags))
|
||||
normal_objects_cflags := $(call $(LOCAL_2ND_ARCH_VAR_PREFIX)convert-to-$(my_host)clang-flags,$(normal_objects_cflags))
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue