Make the default preopt 'interpret-only'.
bug:33799337
bug:36534079
Test: m -j32 bullhead/angler/marlin/sailfish
(cherry picked from commit e0848c8b7f0db40ca86c13bd4f601b8c80f978ea)
Change-Id: I6d71bdca1d7b7afab8150a0b19a0e2235832d5e0
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 4d8e2d2..69b0230 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -152,10 +152,15 @@
endif
endif
-# Jars of system server, and apps loaded into system server should be
-# compiled with the 'speed' compiler filter.
ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE)))
+ # Jars of system server, and apps loaded into system server should be
+ # compiled with the 'speed' compiler filter.
LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed
+else
+ # If no compiler filter is specified, default to 'interpret-only' to save on storage.
+ ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
+ LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=interpret-only
+ endif
endif
$(built_odex): PRIVATE_DEX_PREOPT_FLAGS := $(LOCAL_DEX_PREOPT_FLAGS)