Disable system_server.zip generation for ART prebuilts
system_server.zip does not need to be generated when using the prebuilt mainline modules or if ART_MODULE_BUILD_FROM_SOURCE is false or if MODULE_BUILD_FROM_SOURCE is false
Bug: 274051753
Change-Id: Ifc638eb4e14ed9ea078125d1780a02b9de6b9ccc
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 88ec47f..62c3ba3 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -93,6 +93,7 @@
$(call dist-for-goals, droidcore, $(boot_zip))
+ifneq (,$(filter true,$(ART_MODULE_BUILD_FROM_SOURCE) $(MODULE_BUILD_FROM_SOURCE)))
# Build the system_server.zip which contains the Apex system server jars and standalone system server jars
system_server_zip := $(PRODUCT_OUT)/system_server.zip
apex_system_server_jars := \
@@ -122,5 +123,6 @@
$(call dist-for-goals, droidcore, $(system_server_zip))
+endif #ART_MODULE_BUILD_FROM_SOURCE || MODULE_BUILD_FROM_SOURCE
endif #PRODUCT_USES_DEFAULT_ART_CONFIG
endif #WITH_DEXPREOPT