Select src arch for prebuilts.

Change-Id: I2d08f923d28d59cfef93ff0bd9893352baaee60b
diff --git a/core/definitions.mk b/core/definitions.mk
index d2dc3a6..399eb42 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2145,6 +2145,13 @@
 $(if $(call if-build-from-source,$(2),$(3)),$(eval include $(1)))
 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
 ###########################################################