diff --git a/core/main.mk b/core/main.mk index 9c52b01149..5d2ec7c6af 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1157,13 +1157,12 @@ ifdef FULL_BUILD _modules := $(patsubst %:64,%,$(_modules)) # Sanity check all modules in PRODUCT_PACKAGES exist. We check for the # existence if either or the _32 variant. - _nonexistent_modules := $(filter-out $(ALL_MODULES),$(_modules)) - _nonexistent_modules := $(foreach m,$(_nonexistent_modules),\ - $(if $(call get-32-bit-modules,$(m)),,$(m))) + _nonexistent_modules := $(foreach m,$(_modules), \ + $(if $(or $(ALL_MODULES.$(m).PATH),$(call get-modules-for-2nd-arch,TARGET,$(m))),,$(m))) $(call maybe-print-list-and-error,$(filter-out $(_whitelist),$(_nonexistent_modules)),\ $(INTERNAL_PRODUCT) includes non-existent modules in PRODUCT_PACKAGES) $(call maybe-print-list-and-error,$(filter-out $(_nonexistent_modules),$(_whitelist)),\ - $(INTERNAL_PRODUCT) includes redundant whitelist entries for nonexistent PRODUCT_PACKAGES) + $(INTERNAL_PRODUCT) includes redundant whitelist entries for non-existent PRODUCT_PACKAGES) endif # Check to ensure that all modules in PRODUCT_HOST_PACKAGES exist diff --git a/core/product.mk b/core/product.mk index 0aa07ef5b7..9c54849643 100644 --- a/core/product.mk +++ b/core/product.mk @@ -458,8 +458,8 @@ define require-artifacts-in-path $(sort $(ARTIFACT_PATH_REQUIREMENT_PRODUCTS) $(current_mk))) endef -# Makes including non-existant modules in PRODUCT_PACKAGES an error. -# $(1): whitelist of non-existant modules to allow. +# Makes including non-existent modules in PRODUCT_PACKAGES an error. +# $(1): whitelist of non-existent modules to allow. define enforce-product-packages-exist $(eval current_mk := $(strip $(word 1,$(_include_stack)))) \ $(eval PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST := true) \