am cf1b7d4b: Merge "Select src arch for prebuilts."

* commit 'cf1b7d4b2879f856c831587b52f17063da6af158':
  Select src arch for prebuilts.
This commit is contained in:
Ying Wang 2014-02-27 18:30:20 -08:00 committed by Android Git Automerger
commit 8e286fbfc7
2 changed files with 13 additions and 2 deletions

View file

@ -2145,6 +2145,13 @@ define include-if-build-from-source
$(if $(call if-build-from-source,$(2),$(3)),$(eval include $(1))) $(if $(call if-build-from-source,$(2),$(3)),$(eval include $(1)))
endef endef
## Return the arch for the source file of a prebuilt
# $(1) the list of archs supported by the prebuilt
define get-prebuilt-src-arch
$(strip $(if $(filter $(TARGET_ARCH),$(1)),$(TARGET_ARCH),\
$(if $(filter $(TARGET_2ND_ARCH),$(1)),$(TARGET_2ND_ARCH))))
endef
########################################################### ###########################################################
## Other includes ## Other includes
########################################################### ###########################################################

View file

@ -20,9 +20,13 @@ endif
LOCAL_DONT_CHECK_MODULE := true LOCAL_DONT_CHECK_MODULE := true
ifdef LOCAL_PREBUILT_MODULE_FILE ifdef LOCAL_PREBUILT_MODULE_FILE
my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE) my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE)
else else
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES) ifdef LOCAL_SRC_FILES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
else
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
endif
endif endif
ifdef LOCAL_IS_HOST_MODULE ifdef LOCAL_IS_HOST_MODULE