forked from openkylin/platform_build
make libprotobuf-cpp-* libs VNDK
libprotobuf-cpp-* libs are VNDK, However, since the '.vendor' prefix is added before libprotobuf-cpp-* libs are added to my-*-libraries by LOCAL_PROTOC_OPTIMIZE_TYPE, the clients are still linked against to the platform version of the protobuf libs. As a result, link type error occurs. In order to avoid this, '.vendor' prefix is appended after my-*-*libraries are all updated. Test: normal build successfull Test: add vendor_provided:true to libprotobuf-cpp-* and build successful with BOARD_VNDK_VERSION=true Change-Id: I1ed7978f03e0db56b4cbee86e286c0787f7a3afc
This commit is contained in:
parent
c8387929d1
commit
c8f57d92ff
|
@ -514,37 +514,6 @@ endif
|
||||||
###########################################################
|
###########################################################
|
||||||
my_asflags += -D__ASSEMBLY__
|
my_asflags += -D__ASSEMBLY__
|
||||||
|
|
||||||
###########################################################
|
|
||||||
## When compiling against the VNDK, use LL-NDK libraries
|
|
||||||
###########################################################
|
|
||||||
ifneq ($(LOCAL_USE_VNDK),)
|
|
||||||
####################################################
|
|
||||||
## Soong modules may be built twice, once for /system
|
|
||||||
## and once for /vendor. If we're using the VNDK,
|
|
||||||
## switch all soong libraries over to the /vendor
|
|
||||||
## variant.
|
|
||||||
####################################################
|
|
||||||
ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
|
|
||||||
# Soong-built libraries should always use the .vendor variant
|
|
||||||
my_whole_static_libraries := $(addsuffix .vendor,$(my_whole_static_libraries))
|
|
||||||
my_static_libraries := $(addsuffix .vendor,$(my_static_libraries))
|
|
||||||
my_shared_libraries := $(addsuffix .vendor,$(my_shared_libraries))
|
|
||||||
my_system_shared_libraries := $(addsuffix .vendor,$(my_system_shared_libraries))
|
|
||||||
my_header_libraries := $(addsuffix .vendor,$(my_header_libraries))
|
|
||||||
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
|
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## Define PRIVATE_ variables from global vars
|
## Define PRIVATE_ variables from global vars
|
||||||
###########################################################
|
###########################################################
|
||||||
|
@ -1343,6 +1312,36 @@ $(call track-src-file-obj,$(asm_sources_asm),$(asm_objects_asm))
|
||||||
asm_objects += $(asm_objects_asm)
|
asm_objects += $(asm_objects_asm)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
###########################################################
|
||||||
|
## When compiling against the VNDK, use LL-NDK libraries
|
||||||
|
###########################################################
|
||||||
|
ifneq ($(LOCAL_USE_VNDK),)
|
||||||
|
####################################################
|
||||||
|
## Soong modules may be built twice, once for /system
|
||||||
|
## and once for /vendor. If we're using the VNDK,
|
||||||
|
## switch all soong libraries over to the /vendor
|
||||||
|
## variant.
|
||||||
|
####################################################
|
||||||
|
ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
|
||||||
|
# Soong-built libraries should always use the .vendor variant
|
||||||
|
my_whole_static_libraries := $(addsuffix .vendor,$(my_whole_static_libraries))
|
||||||
|
my_static_libraries := $(addsuffix .vendor,$(my_static_libraries))
|
||||||
|
my_shared_libraries := $(addsuffix .vendor,$(my_shared_libraries))
|
||||||
|
my_system_shared_libraries := $(addsuffix .vendor,$(my_system_shared_libraries))
|
||||||
|
my_header_libraries := $(addsuffix .vendor,$(my_header_libraries))
|
||||||
|
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
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
## Set up installed module dependency
|
## Set up installed module dependency
|
||||||
|
|
Loading…
Reference in New Issue