Replace dependencies from the Makefile to API imported modules
There are some module definitions in the Makefile, which needs to be built with API imported module. This change replaces existing dependencies from the Makefile, to append suffix on the reference, so it can be linked to API imported modules. Bug: 243736650 Test: 'ALLOW_MISSING_DEPENDENCIES=true m halutil' succeeded. Change-Id: I12baa36e41c0c69228be5f0d08fb4c18eb8a22b1
This commit is contained in:
parent
9050cd6d37
commit
ad0d7710fe
3 changed files with 61 additions and 0 deletions
|
@ -1035,6 +1035,24 @@ ALL_MODULES.$(my_register_name).SUPPORTED_VARIANTS := \
|
|||
$(ALL_MODULES.$(my_register_name).SUPPORTED_VARIANTS) \
|
||||
$(filter-out $(ALL_MODULES.$(my_register_name).SUPPORTED_VARIANTS),$(my_supported_variant))
|
||||
|
||||
##########################################################################
|
||||
## When compiling against API imported module, use API import stub
|
||||
## libraries.
|
||||
##########################################################################
|
||||
ifneq ($(LOCAL_USE_VNDK),)
|
||||
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
|
||||
apiimport_postfix := .apiimport
|
||||
ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
|
||||
apiimport_postfix := .apiimport.product
|
||||
else
|
||||
apiimport_postfix := .apiimport.vendor
|
||||
endif
|
||||
|
||||
my_required_modules := $(foreach l,$(my_required_modules), \
|
||||
$(if $(filter $(l), $(API_IMPORTED_SHARED_LIBRARIES)), $(l)$(apiimport_postfix), $(l)))
|
||||
endif
|
||||
endif
|
||||
|
||||
##########################################################################
|
||||
## When compiling against the VNDK, add the .vendor or .product suffix to
|
||||
## required modules.
|
||||
|
|
|
@ -1145,6 +1145,28 @@ ifneq ($(filter hwaddress,$(my_sanitize)),)
|
|||
$(my_static_libraries),hwasan)
|
||||
endif
|
||||
|
||||
###################################################################
|
||||
## When compiling against API imported module, use API import stub
|
||||
## libraries.
|
||||
##################################################################
|
||||
|
||||
apiimport_postfix := .apiimport
|
||||
|
||||
ifneq ($(LOCAL_USE_VNDK),)
|
||||
ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
|
||||
apiimport_postfix := .apiimport.product
|
||||
else
|
||||
apiimport_postfix := .apiimport.vendor
|
||||
endif
|
||||
endif
|
||||
|
||||
my_shared_libraries := $(foreach l,$(my_shared_libraries), \
|
||||
$(if $(filter $(l), $(API_IMPORTED_SHARED_LIBRARIES)), $(l)$(apiimport_postfix), $(l)))
|
||||
my_system_shared_libraries := $(foreach l,$(my_system_shared_libraries), \
|
||||
$(if $(filter $(l), $(API_IMPORTED_SHARED_LIBRARIES)), $(l)$(apiimport_postfix), $(l)))
|
||||
my_header_libraries := $(foreach l,$(my_header_libraries), \
|
||||
$(if $(filter $(l), $(API_IMPORTED_HEADER_LIBRARIES)), $(l)$(apiimport_postfix), $(l)))
|
||||
|
||||
###########################################################
|
||||
## When compiling against the VNDK, use LL-NDK libraries
|
||||
###########################################################
|
||||
|
|
|
@ -139,6 +139,27 @@ my_shared_libraries := $(strip \
|
|||
# my_shared_libraries).
|
||||
include $(BUILD_SYSTEM)/cxx_stl_setup.mk
|
||||
|
||||
# When compiling against API imported module, use API import stub libraries.
|
||||
apiimport_postfix := .apiimport
|
||||
|
||||
ifneq ($(LOCAL_USE_VNDK),)
|
||||
ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
|
||||
apiimport_postfix := .apiimport.product
|
||||
else
|
||||
apiimport_postfix := .apiimport.vendor
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef my_shared_libraries
|
||||
my_shared_libraries := $(foreach l,$(my_shared_libraries), \
|
||||
$(if $(filter $(l), $(API_IMPORTED_SHARED_LIBRARIES)), $(l)$(apiimport_postfix), $(l)))
|
||||
endif #my_shared_libraries
|
||||
|
||||
ifdef my_system_shared_libraries
|
||||
my_system_shared_libraries := $(foreach l,$(my_system_shared_libraries), \
|
||||
$(if $(filter $(l), $(API_IMPORTED_SHARED_LIBRARIES)), $(l)$(apiimport_postfix), $(l)))
|
||||
endif #my_system_shared_libraries
|
||||
|
||||
ifdef my_shared_libraries
|
||||
ifdef LOCAL_USE_VNDK
|
||||
ifeq ($(LOCAL_USE_VNDK_PRODUCT),true)
|
||||
|
|
Loading…
Reference in a new issue