Add Rust vendor image support to Make.
This adds the requisite Make logic to handle Rust vendor modules. Bug: 184042776 Test: Example cc_library vendor module can depend on rust_ffi_shared. Test: Example rust_library vendor-only module compiles. Change-Id: Ib5ef6b403ca7e19a2aac9b77ff08b051425ea019
This commit is contained in:
parent
f92961248b
commit
ae2274b5a2
1 changed files with 41 additions and 0 deletions
|
@ -40,17 +40,58 @@ endif
|
||||||
include $(BUILD_SYSTEM)/base_rules.mk
|
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
|
# The real dependency will be added after all Android.mks are loaded and the install paths
|
||||||
# of the shared libraries are determined.
|
# of the shared libraries are determined.
|
||||||
ifdef LOCAL_INSTALLED_MODULE
|
ifdef LOCAL_INSTALLED_MODULE
|
||||||
ifdef LOCAL_SHARED_LIBRARIES
|
ifdef LOCAL_SHARED_LIBRARIES
|
||||||
my_shared_libraries := $(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 += \
|
$(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \
|
||||||
$(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_shared_libraries))
|
$(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_shared_libraries))
|
||||||
endif
|
endif
|
||||||
ifdef LOCAL_DYLIB_LIBRARIES
|
ifdef LOCAL_DYLIB_LIBRARIES
|
||||||
my_dylibs := $(LOCAL_DYLIB_LIBRARIES)
|
my_dylibs := $(LOCAL_DYLIB_LIBRARIES)
|
||||||
# Treat these as shared library dependencies for installation purposes.
|
# 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 += \
|
$(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \
|
||||||
$(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_dylibs))
|
$(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_dylibs))
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue