Refactor llvm_config.mk and support the 2nd arch
1. Following the setup of gcc in build/core/combo/, we added the [HOST|TARGET]_<arch>.mk clang config files, and load only the configs needed by the current product. 2. Added support for the 2nd arch. Change-Id: I2a383418a9688a050b39492f8e489d40eeeb5f2d
This commit is contained in:
@@ -127,7 +127,7 @@ ifeq ($(strip $(LOCAL_ADDRESS_SANITIZER)),true)
|
||||
my_static_libraries += $(ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(WITHOUT_CLANG)),true)
|
||||
ifeq ($(strip $($(LOCAL_2ND_ARCH_VAR_PREFIX)WITHOUT_CLANG)),true)
|
||||
LOCAL_CLANG :=
|
||||
endif
|
||||
|
||||
@@ -171,9 +171,9 @@ my_target_c_includes := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_C_INCLUDES)
|
||||
endif # LOCAL_SDK_VERSION
|
||||
|
||||
ifeq ($(LOCAL_CLANG),true)
|
||||
my_target_global_cflags := $(CLANG_TARGET_GLOBAL_CFLAGS)
|
||||
my_target_global_cppflags := $(CLANG_TARGET_GLOBAL_CPPFLAGS)
|
||||
my_target_global_ldflags := $(CLANG_TARGET_GLOBAL_LDFLAGS)
|
||||
my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CFLAGS)
|
||||
my_target_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CPPFLAGS)
|
||||
my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_LDFLAGS)
|
||||
my_target_c_includes += $(CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES)
|
||||
else
|
||||
my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS)
|
||||
@@ -294,8 +294,8 @@ normal_objects_mode := $(if $(LOCAL_ARM_MODE),$(LOCAL_ARM_MODE),thumb)
|
||||
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 $(LOCAL_CLANG)),true)
|
||||
arm_objects_cflags := $(call convert-to-$(my_host)clang-flags,$(arm_objects_cflags))
|
||||
normal_objects_cflags := $(call convert-to-$(my_host)clang-flags,$(normal_objects_cflags))
|
||||
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
|
||||
|
||||
else
|
||||
@@ -795,10 +795,10 @@ endif
|
||||
###########################################################
|
||||
|
||||
ifeq ($(LOCAL_CLANG),true)
|
||||
my_cflags := $(call convert-to-$(my_host)clang-flags,$(my_cflags))
|
||||
my_cppflags := $(call convert-to-$(my_host)clang-flags,$(my_cppflags))
|
||||
my_asflags := $(call convert-to-$(my_host)clang-flags,$(my_asflags))
|
||||
my_ldflags := $(call convert-to-$(my_host)clang-flags,$(my_ldflags))
|
||||
my_cflags := $(call $(LOCAL_2ND_ARCH_VAR_PREFIX)convert-to-$(my_host)clang-flags,$(my_cflags))
|
||||
my_cppflags := $(call $(LOCAL_2ND_ARCH_VAR_PREFIX)convert-to-$(my_host)clang-flags,$(my_cppflags))
|
||||
my_asflags := $(call $(LOCAL_2ND_ARCH_VAR_PREFIX)convert-to-$(my_host)clang-flags,$(my_asflags))
|
||||
my_ldflags := $(call $(LOCAL_2ND_ARCH_VAR_PREFIX)convert-to-$(my_host)clang-flags,$(my_ldflags))
|
||||
endif
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS)
|
||||
|
Reference in New Issue
Block a user