Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6a6c35c authored by Ying Wang's avatar Ying Wang
Browse files

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
parent fa63bb72
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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

###########################################################