Drop INTERNAL_PLATFORM_MISSING_USES_LIBRARIES.

INTERNAL_PLATFORM_MISSING_USES_LIBRARIES was a workaround for CLC
construction. It's no longer needed because we have deferred the CLC
construction to Ninja phase.

Bug: 282877248
Test: Presubmit build tests.
Change-Id: Ib5d59caf58394f3bb93b4338146cbbbd58bb4f34
This commit is contained in:
Jiakai Zhang 2023-06-01 15:05:02 +01:00
parent 4f6a18d4cf
commit f09e76c173
3 changed files with 8 additions and 16 deletions

View file

@ -1208,13 +1208,6 @@ TARGET_AVAIALBLE_SDK_VERSIONS := $(call numerically_sort,$(TARGET_AVAILABLE_SDK_
TARGET_SDK_VERSIONS_WITHOUT_JAVA_18_SUPPORT := $(call numbers_less_than,24,$(TARGET_AVAILABLE_SDK_VERSIONS))
TARGET_SDK_VERSIONS_WITHOUT_JAVA_19_SUPPORT := $(call numbers_less_than,30,$(TARGET_AVAILABLE_SDK_VERSIONS))
# Missing optional uses-libraries so that the platform doesn't create build rules that depend on
# them.
INTERNAL_PLATFORM_MISSING_USES_LIBRARIES := \
com.google.android.ble \
com.google.android.media.effects \
com.google.android.wearable \
# This is the standard way to name a directory containing prebuilt target
# objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so
TARGET_PREBUILT_TAG := android-$(TARGET_ARCH)

View file

@ -111,18 +111,19 @@ endif
# Local module variables and functions used in dexpreopt and manifest_check.
################################################################################
my_filtered_optional_uses_libraries := $(filter-out $(INTERNAL_PLATFORM_MISSING_USES_LIBRARIES), \
$(LOCAL_OPTIONAL_USES_LIBRARIES))
# TODO(b/132357300): This may filter out too much, as PRODUCT_PACKAGES doesn't
# include all packages (the full list is unknown until reading all Android.mk
# makefiles). As a consequence, a library may be present but not included in
# dexpreopt, which will result in class loader context mismatch and a failure
# to load dexpreopt code on device. We should fix this, either by deferring
# dependency computation until the full list of product packages is known, or
# by adding product-specific lists of missing libraries.
# to load dexpreopt code on device.
# However, we have to do filtering here. Otherwise, we may include extra
# libraries that Soong and Make don't generate build rules for (e.g., a library
# that exists in the source tree but not installable), and therefore get Ninja
# errors.
# We have deferred CLC computation to the Ninja phase, but the dependency
# computation still needs to be done early. For now, this is the best we can do.
my_filtered_optional_uses_libraries := $(filter $(PRODUCT_PACKAGES), \
$(my_filtered_optional_uses_libraries))
$(LOCAL_OPTIONAL_USES_LIBRARIES))
ifeq ($(LOCAL_MODULE_CLASS),APPS)
# compatibility libraries are added to class loader context of an app only if

View file

@ -251,8 +251,6 @@ $(call add_json_list, ProductPrivateSepolicyDirs, $(PRODUCT_PRIVATE_SEPOL
$(call add_json_list, TargetFSConfigGen, $(TARGET_FS_CONFIG_GEN))
$(call add_json_list, MissingUsesLibraries, $(INTERNAL_PLATFORM_MISSING_USES_LIBRARIES))
$(call add_json_map, VendorVars)
$(foreach namespace,$(sort $(SOONG_CONFIG_NAMESPACES)),\
$(call add_json_map, $(namespace))\