Merge "Remove jars in PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY (e.g. framework-pdf in MP) from ApexBootJars when prebuilt is enabled." into main am: c7bc53999d am: 566f69178c am: b02812d84c

Original change: https://android-review.googlesource.com/c/platform/build/+/2822531

Change-Id: Ia37497d25763fcd2ef563f2cc6097a9cae65737b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alyssa Ketpreechasawat 2023-11-14 20:42:55 +00:00 committed by Automerger Merge Worker
commit 82f52a7cfc
4 changed files with 24 additions and 2 deletions

View file

@ -44,3 +44,17 @@ else
endif
ADDITIONAL_PRODUCT_PROPERTIES += ro.dalvik.vm.enable_uffd_gc=$(ENABLE_UFFD_GC)
# Create APEX_BOOT_JARS_EXCLUDED which is a list of jars to be removed from
# ApexBoorJars when built from mainline prebuilts.
# soong variables indicate whether the prebuilt is enabled:
# - $(m)_module/source_build for art and TOGGLEABLE_PREBUILT_MODULES
# - ANDROID/module_build_from_source for other mainline modules
APEX_BOOT_JARS_EXCLUDED :=
$(foreach pair, $(PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY),\
$(eval m := $(subst com.android.,,$(call word-colon,1,$(pair)))) \
$(if $(call soong_config_get,$(m)_module,source_build), \
$(if $(filter true,$(call soong_config_get,$(m)_module,source_build)),, \
$(eval APEX_BOOT_JARS_EXCLUDED += $(pair))), \
$(if $(filter true,$(call soong_config_get,ANDROID,module_build_from_source)),, \
$(eval APEX_BOOT_JARS_EXCLUDED += $(pair)))))

View file

@ -94,7 +94,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)
$(call add_json_bool, DisableGenerateProfile, $(filter false,$(WITH_DEX_PREOPT_GENERATE_PROFILE)))
$(call add_json_str, ProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR))
$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
$(call add_json_list, ApexBootJars, $(PRODUCT_APEX_BOOT_JARS))
$(call add_json_list, ApexBootJars, $(filter-out $(APEX_BOOT_JARS_EXCLUDED), $(PRODUCT_APEX_BOOT_JARS)))
$(call add_json_list, ArtApexJars, $(filter $(PRODUCT_BOOT_JARS),$(ART_APEX_JARS)))
$(call add_json_list, TestOnlyArtBootImageJars, $(PRODUCT_TEST_ONLY_ART_BOOT_IMAGE_JARS))
$(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS))

View file

@ -164,7 +164,7 @@ $(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(fi
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
$(call add_json_list, ApexBootJars, $(PRODUCT_APEX_BOOT_JARS))
$(call add_json_list, ApexBootJars, $(filter-out $(APEX_BOOT_JARS_EXCLUDED), $(PRODUCT_APEX_BOOT_JARS)))
$(call add_json_bool, VndkUseCoreVariant, $(TARGET_VNDK_USE_CORE_VARIANT))
$(call add_json_bool, VndkSnapshotBuildArtifacts, $(VNDK_SNAPSHOT_BUILD_ARTIFACTS))

View file

@ -57,6 +57,8 @@ PRODUCT_BOOT_JARS += \
ims-common
# APEX boot jars. Keep the list sorted by module names and then library names.
# Note: If the existing apex introduces the new jar, also add it to
# PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY below.
# Note: core-icu4j is moved back to PRODUCT_BOOT_JARS in product_config.mk at a later stage.
# Note: For modules available in Q, DO NOT add new entries here.
PRODUCT_APEX_BOOT_JARS := \
@ -85,6 +87,12 @@ PRODUCT_APEX_BOOT_JARS := \
com.android.virt:framework-virtualization \
com.android.wifi:framework-wifi \
# TODO(b/308174306): Adjust this after multiple prebuilts version is supported.
# APEX boot jars that are not in prebuilt apexes.
# Keep the list sorted by module names and then library names.
PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY := \
com.android.mediaprovider:framework-pdf \
# List of system_server classpath jars delivered via apex.
# Keep the list sorted by module names and then library names.
# Note: For modules available in Q, DO NOT add new entries here.