From a7bb8532f6592419082c2ee97a3a35b9ad6c7678 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Fri, 1 Dec 2023 16:39:48 +0900 Subject: [PATCH] Use SOONG_STUB_VENDOR_LIBRARIES for vendor linker.config.pb STUB_LIBRARIES lists all stub libraries including "system" libraries. There can be a library that provides "stub" only for "system" variant while its vendor variant doesn't. (e.g. libz). In such cases, using STUB_LIBRARIES will result a wrong "provide" list in vendor/etc/linker.config.pb. So, instead, use SOONG_STUB_VENDOR_LIBRARIES which only lists stub libraries that are installed in /vendor. Bug: 313806237 Test: m & cvd start Test: $OUT/vendor/etc/linker.config.pb doesn't list libz.so Change-Id: If0f2089594bda5f799fd495f80a27493553cb4e1 --- core/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index 845f7c8202..08f6ebeba1 100644 --- a/core/Makefile +++ b/core/Makefile @@ -3781,7 +3781,7 @@ ifdef BOARD_USES_VENDOR_DLKMIMAGE ALL_DEFAULT_INSTALLED_MODULES += $(_vendor_dlkm_lib_modules_symlink) endif -# Install vendor/etc/linker.config.pb with PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS and STUB_LIBRARIES +# Install vendor/etc/linker.config.pb with PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS and SOONG_STUB_VENDOR_LIBRARIES vendor_linker_config_file := $(TARGET_OUT_VENDOR)/etc/linker.config.pb $(vendor_linker_config_file): private_linker_config_fragments := $(PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS) $(vendor_linker_config_file): $(INTERNAL_VENDORIMAGE_FILES) $(PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS) | $(HOST_OUT_EXECUTABLES)/conv_linker_config @@ -3792,7 +3792,7 @@ $(vendor_linker_config_file): $(INTERNAL_VENDORIMAGE_FILES) $(PRODUCT_VENDOR_LIN --source $(call normalize-path-list,$(private_linker_config_fragments)) \ --output $@ $(HOST_OUT_EXECUTABLES)/conv_linker_config systemprovide --source $@ \ - --output $@ --value "$(STUB_LIBRARIES)" --system "$(TARGET_OUT_VENDOR)" + --output $@ --value "$(SOONG_STUB_VENDOR_LIBRARIES)" --system "$(TARGET_OUT_VENDOR)" $(call define declare-0p-target,$(vendor_linker_config_file),) INTERNAL_VENDORIMAGE_FILES += $(vendor_linker_config_file) ALL_DEFAULT_INSTALLED_MODULES += $(vendor_linker_config_file)