Use prebuilt VNDK libraries

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Id1f8611f3826199889f029f28cdb52f6d71cf1a0
This commit is contained in:
Deokgyu Yang 2021-05-10 23:47:03 +09:00
parent 82b154b351
commit 36acac53e3
2 changed files with 32 additions and 47 deletions

View file

@ -1,8 +1,20 @@
ifeq ($(BOARD_VNDK_VERSION),)
$(warning ************* BOARD VNDK is not enabled - compiling vndk-sp ***************************)
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/vndk-sp-libs.mk # b/69526027: This VNDK-SP install routine must be removed. Instead, we must
# build vendor variants of the VNDK-SP modules.
ifndef BOARD_VNDK_VERSION
# The libs with "vndk: {enabled: true, support_system_process: true}" will be
# added VNDK_SP_LIBRARIES automatically. And the core variants of the VNDK-SP
# libs will be copied to vndk-sp directory.
# However, some of those libs need FWK-ONLY libs, which must be listed here
# manually.
VNDK_SP_LIBRARIES := \
libdexfile_support \
install_in_hw_dir := \
android.hidl.memory@1.0-impl
vndk_sp_dir := vndk-sp-$(PLATFORM_VNDK_VERSION) vndk_sp_dir := vndk-sp-$(PLATFORM_VNDK_VERSION)
@ -10,13 +22,14 @@ define define-vndk-sp-lib
include $$(CLEAR_VARS) include $$(CLEAR_VARS)
LOCAL_MODULE := $1.vndk-sp-gen LOCAL_MODULE := $1.vndk-sp-gen
LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_PREBUILT_MODULE_FILE := $$(call intermediates-dir-for,SHARED_LIBRARIES,$1)/$1.so LOCAL_PREBUILT_MODULE_FILE := $$(call intermediates-dir-for,SHARED_LIBRARIES,$1,,,,)/$1.so
LOCAL_STRIP_MODULE := false LOCAL_STRIP_MODULE := false
LOCAL_MULTILIB := first LOCAL_MULTILIB := first
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_INSTALLED_MODULE_STEM := $1.so LOCAL_INSTALLED_MODULE_STEM := $1.so
LOCAL_MODULE_SUFFIX := .so LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir) LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir)$(if $(filter $1,$(install_in_hw_dir)),/hw)
LOCAL_CHECK_ELF_FILES := false
include $$(BUILD_PREBUILT) include $$(BUILD_PREBUILT)
ifneq ($$(TARGET_2ND_ARCH),) ifneq ($$(TARGET_2ND_ARCH),)
@ -24,26 +37,36 @@ ifneq ($$(TARGET_TRANSLATE_2ND_ARCH),true)
include $$(CLEAR_VARS) include $$(CLEAR_VARS)
LOCAL_MODULE := $1.vndk-sp-gen LOCAL_MODULE := $1.vndk-sp-gen
LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_PREBUILT_MODULE_FILE := $$(call intermediates-dir-for,SHARED_LIBRARIES,$1,,,$(TARGET_2ND_ARCH_VAR_PREFIX))/$1.so LOCAL_PREBUILT_MODULE_FILE := $$(call intermediates-dir-for,SHARED_LIBRARIES,$1,,,$$(TARGET_2ND_ARCH_VAR_PREFIX),)/$1.so
LOCAL_STRIP_MODULE := false LOCAL_STRIP_MODULE := false
LOCAL_MULTILIB := 32 LOCAL_MULTILIB := 32
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_INSTALLED_MODULE_STEM := $1.so LOCAL_INSTALLED_MODULE_STEM := $1.so
LOCAL_MODULE_SUFFIX := .so LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir) LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir)$(if $(filter $1,$(install_in_hw_dir)),/hw)
LOCAL_CHECK_ELF_FILES := false
include $$(BUILD_PREBUILT) include $$(BUILD_PREBUILT)
endif # TARGET_TRANSLATE_2ND_ARCH is not true endif # TARGET_TRANSLATE_2ND_ARCH is not true
endif # TARGET_2ND_ARCH is not empty endif # TARGET_2ND_ARCH is not empty
endef endef
# Add VNDK-SP libs to the list if they are missing
$(foreach lib,$(VNDK_SAMEPROCESS_LIBRARIES),\
$(if $(filter $(lib),$(VNDK_SP_LIBRARIES)),,\
$(eval VNDK_SP_LIBRARIES += $(lib))))
# Remove libz from the VNDK-SP list (b/73296261)
VNDK_SP_LIBRARIES := $(filter-out libz,$(VNDK_SP_LIBRARIES))
$(foreach lib,$(VNDK_SP_LIBRARIES),\ $(foreach lib,$(VNDK_SP_LIBRARIES),\
$(eval $(call define-vndk-sp-lib,$(lib)))) $(eval $(call define-vndk-sp-lib,$(lib))))
install_in_hw_dir :=
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := vndk-sp LOCAL_MODULE := vndk-sp
LOCAL_MODULE_OWNER := google
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_REQUIRED_MODULES := $(addsuffix .vndk-sp-gen,$(VNDK_SP_LIBRARIES)) LOCAL_REQUIRED_MODULES := $(addsuffix .vndk-sp-gen,$(VNDK_SP_LIBRARIES))
include $(BUILD_PHONY_PACKAGE) include $(BUILD_PHONY_PACKAGE)
vndk_sp_dir :=
endif endif

View file

@ -1,38 +0,0 @@
VNDK_SP_LIBRARIES := \
android.hardware.graphics.mapper@2.0 \
android.hardware.graphics.mapper@2.1 \
android.hardware.graphics.mapper@3.0 \
android.hardware.graphics.common@1.0 \
android.hardware.graphics.common@1.1 \
android.hardware.graphics.common@1.2 \
android.hardware.renderscript@1.0 \
android.hidl.memory@1.0 \
android.hidl.memory.token@1.0 \
android.hidl.safe_union@1.0 \
libRSCpuRef \
libRSDriver \
libRS_internal \
libdexfile_support \
libbacktrace \
libbase \
libbcinfo \
libbinderthreadstate \
libblas \
libc++ \
libcompiler_rt \
libcutils \
libhardware \
libhidlbase \
libhidlmemory \
libhidltransport \
libhwbinder_noltopgo \
libhwbinder \
libion \
libjsoncpp \
liblzma \
libprocessgroup \
libunwind \
libunwindstack\
libutils \
libutilscallstack \
libz