Merge "Resolve module bitness for target-host required modules" am: c9b0f0a9a5
Original change: https://android-review.googlesource.com/c/platform/build/+/1344818 Change-Id: I49504f9817f63933f96cd705d910b561b1665a69
This commit is contained in:
commit
156fa7335a
1 changed files with 44 additions and 16 deletions
36
core/main.mk
36
core/main.mk
|
@ -642,9 +642,11 @@ $(strip \
|
|||
endef
|
||||
|
||||
# TODO(b/7456955): error if a required module doesn't exist.
|
||||
# Resolve the required module names in ALL_MODULES.*.REQUIRED_FROM_TARGET,
|
||||
# ALL_MODULES.*.REQUIRED_FROM_HOST and ALL_MODULES.*.REQUIRED_FROM_HOST_CROSS
|
||||
# to 32-bit or 64-bit variant.
|
||||
# Resolve the required module names to 32-bit or 64-bit variant for:
|
||||
# ALL_MODULES.<*>.REQUIRED_FROM_TARGET
|
||||
# ALL_MODULES.<*>.REQUIRED_FROM_HOST
|
||||
# ALL_MODULES.<*>.REQUIRED_FROM_HOST_CROSS
|
||||
#
|
||||
# If a module is for cross host OS, the required modules are also for that OS.
|
||||
# Required modules explicitly suffixed with :32 or :64 resolve to that bitness.
|
||||
# Otherwise if the requiring module is native and the required module is shared
|
||||
|
@ -660,7 +662,8 @@ $(foreach m,$(ALL_MODULES), \
|
|||
$(eval r := $(addprefix host_cross_,$(r)))) \
|
||||
$(eval module_is_native := \
|
||||
$(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(ALL_MODULES.$(m).CLASS))) \
|
||||
$(eval r_r := $(foreach r_i,$(r), \
|
||||
$(eval r_r := \
|
||||
$(foreach r_i,$(r), \
|
||||
$(if $(filter %:32 %:64,$(r_i)), \
|
||||
$(eval r_m := $(call resolve-bitness-for-modules,$(1),$(r_i))), \
|
||||
$(eval r_m := \
|
||||
|
@ -678,9 +681,34 @@ $(foreach m,$(ALL_MODULES), \
|
|||
)
|
||||
endef
|
||||
|
||||
# Resolve the required module names to 32-bit or 64-bit variant for:
|
||||
# ALL_MODULES.<*>.TARGET_REQUIRED_FROM_HOST
|
||||
# ALL_MODULES.<*>.HOST_REQUIRED_FROM_TARGET
|
||||
#
|
||||
# This is like select-bitness-of-required-modules, but it doesn't have
|
||||
# complicated logic for various module types.
|
||||
# Calls resolve-bitness-for-modules to resolve module names.
|
||||
# $(1): TARGET or HOST
|
||||
# $(2): HOST or TARGET
|
||||
define select-bitness-of-target-host-required-modules
|
||||
$(foreach m,$(ALL_MODULES), \
|
||||
$(eval r := $(ALL_MODULES.$(m).$(1)_REQUIRED_FROM_$(2))) \
|
||||
$(if $(r), \
|
||||
$(eval r_r := \
|
||||
$(foreach r_i,$(r), \
|
||||
$(eval r_m := $(call resolve-bitness-for-modules,$(1),$(r_i))) \
|
||||
$(eval ### TODO(b/7456955): error if r_m is empty / does not exist) \
|
||||
$(r_m))) \
|
||||
$(eval ALL_MODULES.$(m).$(1)_REQUIRED_FROM_$(2) := $(sort $(r_r))) \
|
||||
) \
|
||||
)
|
||||
endef
|
||||
|
||||
$(call select-bitness-of-required-modules,TARGET)
|
||||
$(call select-bitness-of-required-modules,HOST)
|
||||
$(call select-bitness-of-required-modules,HOST_CROSS)
|
||||
$(call select-bitness-of-target-host-required-modules,TARGET,HOST)
|
||||
$(call select-bitness-of-target-host-required-modules,HOST,TARGET)
|
||||
|
||||
define add-required-deps
|
||||
$(1): | $(2)
|
||||
|
|
Loading…
Reference in a new issue