Merge "Add Rust vendor image support to Make."

This commit is contained in:
Ivan Lozano 2021-04-14 19:02:48 +00:00 committed by Gerrit Code Review
commit 1e3771f9ed

View file

@ -40,17 +40,58 @@ endif
include $(BUILD_SYSTEM)/base_rules.mk
#######################################
ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES RLIB_LIBRARIES DYLIB_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
# Soong module is a static or shared library
EXPORTS_LIST += $(intermediates)
EXPORTS.$(intermediates).FLAGS := $(LOCAL_EXPORT_CFLAGS)
EXPORTS.$(intermediates).DEPS := $(LOCAL_EXPORT_C_INCLUDE_DEPS)
SOONG_ALREADY_CONV += $(LOCAL_MODULE)
my_link_type := $(LOCAL_SOONG_LINK_TYPE)
my_warn_types :=
my_allowed_types :=
my_link_deps :=
my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
my_common :=
include $(BUILD_SYSTEM)/link_type.mk
endif
ifdef LOCAL_USE_VNDK
ifneq ($(LOCAL_VNDK_DEPEND_ON_CORE_VARIANT),true)
name_without_suffix := $(patsubst %.vendor,%,$(LOCAL_MODULE))
ifneq ($(name_without_suffix),$(LOCAL_MODULE))
SPLIT_VENDOR.$(LOCAL_MODULE_CLASS).$(name_without_suffix) := 1
else
name_without_suffix := $(patsubst %.product,%,$(LOCAL_MODULE))
ifneq ($(name_without_suffix),$(LOCAL_MODULE))
SPLIT_PRODUCT.$(LOCAL_MODULE_CLASS).$(name_without_suffix) := 1
endif
endif
name_without_suffix :=
endif
endif
# The real dependency will be added after all Android.mks are loaded and the install paths
# of the shared libraries are determined.
ifdef LOCAL_INSTALLED_MODULE
ifdef LOCAL_SHARED_LIBRARIES
my_shared_libraries := $(LOCAL_SHARED_LIBRARIES)
ifdef LOCAL_USE_VNDK
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
endif
$(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \
$(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_shared_libraries))
endif
ifdef LOCAL_DYLIB_LIBRARIES
my_dylibs := $(LOCAL_DYLIB_LIBRARIES)
# Treat these as shared library dependencies for installation purposes.
ifdef LOCAL_USE_VNDK
my_dylibs := $(foreach l,$(my_dylibs),\
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
endif
$(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \
$(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_dylibs))
endif