aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-09-26 10:41:27 -0700
committerYing Wang <wangying@google.com>2014-09-26 10:41:27 -0700
commita6a6c35c3afdf9c4bcd05ea5e4c40983e7e49246 (patch)
treee05ef2917d71e22e5407b99363286254f614a861
parentfa63bb72c980a12178bf7e150988a851619a1bd6 (diff)
downloadbuild-a6a6c35c3afdf9c4bcd05ea5e4c40983e7e49246.tar.gz
Return "none" if no matching arch found
So result of get-prebuilt-src-arch can be passed to LOCAL_MODULE_TARGET_ARCH, which takes empty string as "any" actually. Change-Id: I916c9738ccce4a94ac084fb4141d54659e896a1f
-rw-r--r--core/definitions.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/definitions.mk b/core/definitions.mk
index 3bded9ff44..d7d8b25e9c 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2187,11 +2187,13 @@ define include-if-build-from-source
$(if $(call if-build-from-source,$(2),$(3)),$(eval include $(1)))
endef
-## Return the arch for the source file of a prebuilt
+# Return the arch for the source file of a prebuilt
+# Return "none" if no matching arch found, so the result can be passed to
+# LOCAL_MODULE_TARGET_ARCH.
# $(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))))
+ $(if $(filter $(TARGET_2ND_ARCH),$(1)),$(TARGET_2ND_ARCH),none)))
endef
###########################################################