Revert "Linktype check for native:product"
This reverts commit 4e7e76fe5a
.
Reason for revert: build breaks (bid: 6147225) and postsubmit test fails.
There are some modules that have both "product_specific: true" and "vendor_available: true", which tags the module as "native:product" unintentionally.
We need to clean up these cases first and revisit this CL.
Bug: 146620523
Bug: 147987741
Change-Id: Ib07543235d72a135b6b732aaa909c147d2df832b
This commit is contained in:
parent
4e7e76fe5a
commit
dd5401713c
|
@ -800,28 +800,22 @@ ifdef LOCAL_IS_HOST_MODULE
|
||||||
my_required_modules += $(LOCAL_REQUIRED_MODULES_$($(my_prefix)OS))
|
my_required_modules += $(LOCAL_REQUIRED_MODULES_$($(my_prefix)OS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
##########################################################################
|
###############################################################################
|
||||||
## When compiling against the VNDK, add the .vendor or .product suffix to
|
## When compiling against the VNDK, add the .vendor suffix to required modules.
|
||||||
## required modules.
|
###############################################################################
|
||||||
##########################################################################
|
|
||||||
ifneq ($(LOCAL_USE_VNDK),)
|
ifneq ($(LOCAL_USE_VNDK),)
|
||||||
#####################################################
|
####################################################
|
||||||
## Soong modules may be built three times, once for
|
## Soong modules may be built twice, once for /system
|
||||||
## /system, once for /vendor and once for /product.
|
## and once for /vendor. If we're using the VNDK,
|
||||||
## If we're using the VNDK, switch all soong
|
## switch all soong libraries over to the /vendor
|
||||||
## libraries over to the /vendor or /product variant.
|
## variant.
|
||||||
#####################################################
|
####################################################
|
||||||
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
|
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
|
||||||
# We don't do this renaming for soong-defined modules since they already
|
# We don't do this renaming for soong-defined modules since they already
|
||||||
# have correct names (with .vendor or .product suffix when necessary) in
|
# have correct names (with .vendor suffix when necessary) in their
|
||||||
# their LOCAL_*_LIBRARIES.
|
# LOCAL_*_LIBRARIES.
|
||||||
ifeq ($(LOCAL_PRODUCT_MODULE),true)
|
my_required_modules := $(foreach l,$(my_required_modules),\
|
||||||
my_required_modules := $(foreach l,$(my_required_modules),\
|
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
||||||
$(if $(SPLIT_PRODUCT.SHARED_LIBRARIES.$(l)),$(l).product,$(l)))
|
|
||||||
else
|
|
||||||
my_required_modules := $(foreach l,$(my_required_modules),\
|
|
||||||
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1145,35 +1145,22 @@ endif
|
||||||
## When compiling against the VNDK, use LL-NDK libraries
|
## When compiling against the VNDK, use LL-NDK libraries
|
||||||
###########################################################
|
###########################################################
|
||||||
ifneq ($(LOCAL_USE_VNDK),)
|
ifneq ($(LOCAL_USE_VNDK),)
|
||||||
#####################################################
|
####################################################
|
||||||
## Soong modules may be built three times, once for
|
## Soong modules may be built twice, once for /system
|
||||||
## /system, once for /vendor and once for /product.
|
## and once for /vendor. If we're using the VNDK,
|
||||||
## If we're using the VNDK, switch all soong
|
## switch all soong libraries over to the /vendor
|
||||||
## libraries over to the /vendor or /product variant.
|
## variant.
|
||||||
#####################################################
|
####################################################
|
||||||
ifeq ($(LOCAL_PRODUCT_MODULE),true)
|
my_whole_static_libraries := $(foreach l,$(my_whole_static_libraries),\
|
||||||
my_whole_static_libraries := $(foreach l,$(my_whole_static_libraries),\
|
$(if $(SPLIT_VENDOR.STATIC_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
||||||
$(if $(SPLIT_PRODUCT.STATIC_LIBRARIES.$(l)),$(l).product,$(l)))
|
my_static_libraries := $(foreach l,$(my_static_libraries),\
|
||||||
my_static_libraries := $(foreach l,$(my_static_libraries),\
|
$(if $(SPLIT_VENDOR.STATIC_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
||||||
$(if $(SPLIT_PRODUCT.STATIC_LIBRARIES.$(l)),$(l).product,$(l)))
|
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
|
||||||
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
|
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
||||||
$(if $(SPLIT_PRODUCT.SHARED_LIBRARIES.$(l)),$(l).product,$(l)))
|
my_system_shared_libraries := $(foreach l,$(my_system_shared_libraries),\
|
||||||
my_system_shared_libraries := $(foreach l,$(my_system_shared_libraries),\
|
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
||||||
$(if $(SPLIT_PRODUCT.SHARED_LIBRARIES.$(l)),$(l).product,$(l)))
|
my_header_libraries := $(foreach l,$(my_header_libraries),\
|
||||||
my_header_libraries := $(foreach l,$(my_header_libraries),\
|
$(if $(SPLIT_VENDOR.HEADER_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
||||||
$(if $(SPLIT_PRODUCT.HEADER_LIBRARIES.$(l)),$(l).product,$(l)))
|
|
||||||
else
|
|
||||||
my_whole_static_libraries := $(foreach l,$(my_whole_static_libraries),\
|
|
||||||
$(if $(SPLIT_VENDOR.STATIC_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
|
||||||
my_static_libraries := $(foreach l,$(my_static_libraries),\
|
|
||||||
$(if $(SPLIT_VENDOR.STATIC_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
|
||||||
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
|
|
||||||
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
|
||||||
my_system_shared_libraries := $(foreach l,$(my_system_shared_libraries),\
|
|
||||||
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
|
||||||
my_header_libraries := $(foreach l,$(my_header_libraries),\
|
|
||||||
$(if $(SPLIT_VENDOR.HEADER_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Platform can use vendor public libraries. If a required shared lib is one of
|
# Platform can use vendor public libraries. If a required shared lib is one of
|
||||||
|
@ -1220,7 +1207,6 @@ my_warn_types := $(my_warn_ndk_types)
|
||||||
my_allowed_types := $(my_allowed_ndk_types)
|
my_allowed_types := $(my_allowed_ndk_types)
|
||||||
else ifdef LOCAL_USE_VNDK
|
else ifdef LOCAL_USE_VNDK
|
||||||
_name := $(patsubst %.vendor,%,$(LOCAL_MODULE))
|
_name := $(patsubst %.vendor,%,$(LOCAL_MODULE))
|
||||||
_name := $(patsubst %.product,%,$(LOCAL_MODULE))
|
|
||||||
ifneq ($(filter $(_name),$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES) $(LLNDK_LIBRARIES)),)
|
ifneq ($(filter $(_name),$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES) $(LLNDK_LIBRARIES)),)
|
||||||
ifeq ($(filter $(_name),$(VNDK_PRIVATE_LIBRARIES)),)
|
ifeq ($(filter $(_name),$(VNDK_PRIVATE_LIBRARIES)),)
|
||||||
my_link_type := native:vndk
|
my_link_type := native:vndk
|
||||||
|
@ -1229,12 +1215,6 @@ else ifdef LOCAL_USE_VNDK
|
||||||
endif
|
endif
|
||||||
my_warn_types :=
|
my_warn_types :=
|
||||||
my_allowed_types := native:vndk native:vndk_private
|
my_allowed_types := native:vndk native:vndk_private
|
||||||
else ifeq ($(LOCAL_PRODUCT_MODULE),true)
|
|
||||||
# Modules installed to /product cannot directly depend on modules marked
|
|
||||||
# with vendor_available: false
|
|
||||||
my_link_type := native:product
|
|
||||||
my_warn_types :=
|
|
||||||
my_allowed_types := native:product native:vndk native:platform_vndk
|
|
||||||
else
|
else
|
||||||
# Modules installed to /vendor cannot directly depend on modules marked
|
# Modules installed to /vendor cannot directly depend on modules marked
|
||||||
# with vendor_available: false
|
# with vendor_available: false
|
||||||
|
|
|
@ -85,7 +85,6 @@ ifdef LOCAL_SDK_VERSION
|
||||||
my_link_type := native:ndk:$(my_ndk_stl_family):$(my_ndk_stl_link_type)
|
my_link_type := native:ndk:$(my_ndk_stl_family):$(my_ndk_stl_link_type)
|
||||||
else ifdef LOCAL_USE_VNDK
|
else ifdef LOCAL_USE_VNDK
|
||||||
_name := $(patsubst %.vendor,%,$(LOCAL_MODULE))
|
_name := $(patsubst %.vendor,%,$(LOCAL_MODULE))
|
||||||
_name := $(patsubst %.product,%,$(LOCAL_MODULE))
|
|
||||||
ifneq ($(filter $(_name),$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES) $(LLNDK_LIBRARIES)),)
|
ifneq ($(filter $(_name),$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES) $(LLNDK_LIBRARIES)),)
|
||||||
ifeq ($(filter $(_name),$(VNDK_PRIVATE_LIBRARIES)),)
|
ifeq ($(filter $(_name),$(VNDK_PRIVATE_LIBRARIES)),)
|
||||||
my_link_type := native:vndk
|
my_link_type := native:vndk
|
||||||
|
@ -93,11 +92,7 @@ else ifdef LOCAL_USE_VNDK
|
||||||
my_link_type := native:vndk_private
|
my_link_type := native:vndk_private
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifeq ($(LOCAL_PRODUCT_MODULE),true)
|
my_link_type := native:vendor
|
||||||
my_link_type := native:product
|
|
||||||
else
|
|
||||||
my_link_type := native:vendor
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
else ifneq ($(filter $(TARGET_RECOVERY_OUT)/%,$(LOCAL_MODULE_PATH)),)
|
else ifneq ($(filter $(TARGET_RECOVERY_OUT)/%,$(LOCAL_MODULE_PATH)),)
|
||||||
my_link_type := native:recovery
|
my_link_type := native:recovery
|
||||||
|
@ -141,13 +136,8 @@ include $(BUILD_SYSTEM)/cxx_stl_setup.mk
|
||||||
|
|
||||||
ifdef my_shared_libraries
|
ifdef my_shared_libraries
|
||||||
ifdef LOCAL_USE_VNDK
|
ifdef LOCAL_USE_VNDK
|
||||||
ifeq ($(LOCAL_PRODUCT_MODULE),true)
|
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
|
||||||
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
|
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
||||||
$(if $(SPLIT_PRODUCT.SHARED_LIBRARIES.$(l)),$(l).product,$(l)))
|
|
||||||
else
|
|
||||||
my_shared_libraries := $(foreach l,$(my_shared_libraries),\
|
|
||||||
$(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
|
|
||||||
endif
|
|
||||||
endif
|
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))
|
||||||
|
|
|
@ -106,13 +106,11 @@ ifneq ($(strip $(LOCAL_JNI_SHARED_LIBRARIES)),)
|
||||||
my_allowed_types := $(my_allowed_ndk_types)
|
my_allowed_types := $(my_allowed_ndk_types)
|
||||||
ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
|
ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
|
||||||
my_allowed_types += native:vendor native:vndk native:platform_vndk
|
my_allowed_types += native:vendor native:vndk native:platform_vndk
|
||||||
else ifeq ($(LOCAL_PRODUCT_MODULE),true)
|
|
||||||
my_allowed_types += native:product native:vndk native:platform_vndk
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
my_link_type := app:platform
|
my_link_type := app:platform
|
||||||
my_warn_types := $(my_warn_ndk_types)
|
my_warn_types := $(my_warn_ndk_types)
|
||||||
my_allowed_types := $(my_allowed_ndk_types) native:platform native:product native:vendor native:vndk native:vndk_private native:platform_vndk
|
my_allowed_types := $(my_allowed_ndk_types) native:platform native:vendor native:vndk native:vndk_private native:platform_vndk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
my_link_deps := $(addprefix SHARED_LIBRARIES:,$(LOCAL_JNI_SHARED_LIBRARIES))
|
my_link_deps := $(addprefix SHARED_LIBRARIES:,$(LOCAL_JNI_SHARED_LIBRARIES))
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
#Set LOCAL_USE_VNDK for modules going into product, vendor or odm partition, except for host modules
|
#Set LOCAL_USE_VNDK for modules going into vendor or odm partition, except for host modules
|
||||||
#If LOCAL_SDK_VERSION is set, thats a more restrictive set, so they dont need LOCAL_USE_VNDK
|
#If LOCAL_SDK_VERSION is set, thats a more restrictive set, so they dont need LOCAL_USE_VNDK
|
||||||
ifndef LOCAL_IS_HOST_MODULE
|
ifndef LOCAL_IS_HOST_MODULE
|
||||||
ifndef LOCAL_SDK_VERSION
|
ifndef LOCAL_SDK_VERSION
|
||||||
ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_OEM_MODULE) $(LOCAL_PROPRIETARY_MODULE) $(LOCAL_PRODUCT_MODULE)))
|
ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_OEM_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
|
||||||
LOCAL_USE_VNDK:=true
|
LOCAL_USE_VNDK:=true
|
||||||
# Note: no need to check LOCAL_MODULE_PATH* since LOCAL_[VENDOR|ODM|OEM]_MODULE is already
|
# Note: no need to check LOCAL_MODULE_PATH* since LOCAL_[VENDOR|ODM|OEM]_MODULE is already
|
||||||
# set correctly before this is included.
|
# set correctly before this is included.
|
||||||
|
@ -34,11 +34,5 @@ ifdef LOCAL_USE_VNDK
|
||||||
ifndef BOARD_VNDK_VERSION
|
ifndef BOARD_VNDK_VERSION
|
||||||
LOCAL_USE_VNDK:=
|
LOCAL_USE_VNDK:=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef PRODUCT_PRODUCT_VNDK_VERSION
|
|
||||||
ifneq (,$(filter true,$(LOCAL_PRODUCT_MODULE)))
|
|
||||||
LOCAL_USE_VNDK :=
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -75,13 +75,8 @@ endif
|
||||||
ifdef LOCAL_USE_VNDK
|
ifdef LOCAL_USE_VNDK
|
||||||
ifneq ($(LOCAL_VNDK_DEPEND_ON_CORE_VARIANT),true)
|
ifneq ($(LOCAL_VNDK_DEPEND_ON_CORE_VARIANT),true)
|
||||||
name_without_suffix := $(patsubst %.vendor,%,$(LOCAL_MODULE))
|
name_without_suffix := $(patsubst %.vendor,%,$(LOCAL_MODULE))
|
||||||
ifneq ($(name_without_suffix),$(LOCAL_MODULE))
|
ifneq ($(name_without_suffix),$(LOCAL_MODULE)
|
||||||
SPLIT_VENDOR.$(LOCAL_MODULE_CLASS).$(name_without_suffix) := 1
|
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
|
endif
|
||||||
name_without_suffix :=
|
name_without_suffix :=
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue