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

Commit 74ccefbe authored by Chih-Wei Huang's avatar Chih-Wei Huang Committed by Chih-Wei Huang
Browse files

Let get-prebuilt-src-arch return empty if the input is empty

The list of archs of a pure java apk (no native libs) is empty.
In this case get-prebuilt-src-arch still return 'none'.
If it's set to LOCAL_MODULE_TARGET_ARCH, it makes the apk
be incompatible with the building target. It's not good.

Just return empty in this case.

Change-Id: Ide75cdb08c8480c8e7d3a0ac59f41831fbc18bd5
parent 723a2653
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -2515,12 +2515,13 @@ $(if $(call if-build-from-source,$(2),$(3)),$(eval include $(1)))
endef
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
# Return "none" if no matching arch found and return empty
# if the input is empty, so the result can be passed to
# LOCAL_MODULE_TARGET_ARCH.
# LOCAL_MODULE_TARGET_ARCH.
# $(1) the list of archs supported by the prebuilt
# $(1) the list of archs supported by the prebuilt
define get-prebuilt-src-arch
define get-prebuilt-src-arch
$(strip $(if $(filter $(TARGET_ARCH),$(1)),$(TARGET_ARCH),\
$(strip $(if $(filter $(TARGET_ARCH),$(1)),$(TARGET_ARCH),\
  $(if $(filter $(TARGET_2ND_ARCH),$(1)),$(TARGET_2ND_ARCH),none)))
  $(if $(filter $(TARGET_2ND_ARCH),$(1)),$(TARGET_2ND_ARCH),$(if $(1),none))))
endef
endef


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