Merge topic 'tests'
* changes: add support for LOCAL_MODULE_STEM_32 and LOCAL_MODULE_STEM_64 add support for LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64
This commit is contained in:
commit
36a67a9040
6 changed files with 38 additions and 28 deletions
|
@ -99,8 +99,21 @@ ifneq ($(words $(LOCAL_MODULE_CLASS)),1)
|
|||
$(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)")
|
||||
endif
|
||||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_IS_64_BIT),64,32)
|
||||
endif
|
||||
|
||||
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
my_multilib_module_path := $(strip $(LOCAL_MODULE_PATH_$(my_32_64_bit_suffix)))
|
||||
else
|
||||
my_multilib_module_path :=
|
||||
endif
|
||||
ifdef my_multilib_module_path
|
||||
my_module_path := $(my_multilib_module_path)
|
||||
else
|
||||
my_module_path := $(strip $(LOCAL_MODULE_PATH))
|
||||
endif
|
||||
my_module_relative_path := $(strip $(LOCAL_MODULE_RELATIVE_PATH))
|
||||
ifeq ($(my_module_path),)
|
||||
ifdef LOCAL_IS_HOST_MODULE
|
||||
|
@ -154,17 +167,7 @@ generated_sources_dir := $(call local-generated-sources-dir)
|
|||
###########################################################
|
||||
# Pick a name for the intermediate and final targets
|
||||
###########################################################
|
||||
ifndef LOCAL_MODULE_STEM
|
||||
LOCAL_MODULE_STEM := $(LOCAL_MODULE)
|
||||
endif
|
||||
|
||||
ifndef LOCAL_BUILT_MODULE_STEM
|
||||
LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX)
|
||||
endif
|
||||
|
||||
ifndef LOCAL_INSTALLED_MODULE_STEM
|
||||
LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX)
|
||||
endif
|
||||
include $(BUILD_SYSTEM)/configure_module_stem.mk
|
||||
|
||||
# OVERRIDE_BUILT_MODULE_PATH is only allowed to be used by the
|
||||
# internal SHARED_LIBRARIES build files.
|
||||
|
|
|
@ -106,8 +106,6 @@ my_c_includes := $(LOCAL_C_INCLUDES)
|
|||
my_generated_sources := $(LOCAL_GENERATED_SOURCES)
|
||||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_IS_64_BIT),64,32)
|
||||
|
||||
my_src_files += $(LOCAL_SRC_FILES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_SRC_FILES_$(my_32_64_bit_suffix))
|
||||
my_shared_libraries += $(LOCAL_SHARED_LIBRARIES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_SHARED_LIBRARIES_$(my_32_64_bit_suffix))
|
||||
my_cflags += $(LOCAL_CFLAGS_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CFLAGS_$(my_32_64_bit_suffix))
|
||||
|
|
|
@ -197,6 +197,10 @@ LOCAL_ASFLAGS_32:=
|
|||
LOCAL_ASFLAGS_64:=
|
||||
LOCAL_C_INCLUDES_32:=
|
||||
LOCAL_C_INCLUDES_64:=
|
||||
LOCAL_MODULE_PATH_32:=
|
||||
LOCAL_MODULE_PATH_64:=
|
||||
LOCAL_MODULE_STEM_32:=
|
||||
LOCAL_MODULE_STEM_64:=
|
||||
|
||||
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
|
||||
# iterate over thousands of entries every time.
|
||||
|
|
16
core/configure_module_stem.mk
Normal file
16
core/configure_module_stem.mk
Normal file
|
@ -0,0 +1,16 @@
|
|||
my_multilib_stem := $(LOCAL_MODULE_STEM_$(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_IS_64_BIT),64,32))
|
||||
ifdef my_multilib_stem
|
||||
LOCAL_MODULE_STEM := $(my_multilib_stem)
|
||||
endif
|
||||
|
||||
ifndef LOCAL_MODULE_STEM
|
||||
LOCAL_MODULE_STEM := $(LOCAL_MODULE)
|
||||
endif
|
||||
|
||||
ifndef LOCAL_BUILT_MODULE_STEM
|
||||
LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX)
|
||||
endif
|
||||
|
||||
ifndef LOCAL_INSTALLED_MODULE_STEM
|
||||
LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX)
|
||||
endif
|
|
@ -13,20 +13,9 @@ $(error This file should not be used to build host binaries. Included by (or ne
|
|||
endif
|
||||
|
||||
# The name of the target file, without any path prepended.
|
||||
# TODO: This duplicates logic from base_rules.mk because we need to
|
||||
# know its results before base_rules.mk is included.
|
||||
# Consolidate the duplicates.
|
||||
ifndef LOCAL_MODULE_STEM
|
||||
LOCAL_MODULE_STEM := $(LOCAL_MODULE)
|
||||
endif
|
||||
|
||||
ifndef LOCAL_BUILT_MODULE_STEM
|
||||
LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX)
|
||||
endif
|
||||
|
||||
ifndef LOCAL_INSTALLED_MODULE_STEM
|
||||
LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX)
|
||||
endif
|
||||
# This duplicates logic from base_rules.mk because we need to
|
||||
# know its results before base_rules.mk is included.
|
||||
include $(BUILD_SYSTEM)/configure_module_stem.mk
|
||||
|
||||
# base_rules.make defines $(intermediates), but we need its value
|
||||
# before we include base_rules. Make a guess, and verify that
|
||||
|
|
|
@ -16,7 +16,7 @@ endif
|
|||
ifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),)
|
||||
$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
|
||||
endif
|
||||
ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
|
||||
ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)$(LOCAL_MODULE_STEM_32)$(LOCAL_MODULE_STEM_64)),)
|
||||
$(error $(LOCAL_PATH): Cannot set module stem for a library)
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue