Allow system server jars for WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
Renamed WITH_DEXPREOPT_BOOT_IMG_ONLY to
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY and changed the
behavior accordingly.
Preopt system server jars since selinux prevents system server from
loading anything from /data. If we don't do this they will need to
be extracted which is not favorable for RAM usage or performance.
Test: make and flash and look at system server maps
Bug: 65122284
Bug: 62356545
(cherry picked from commit 418258cee9
)
Merged-In: I2e70c80a86327b455450b95144f21020e7bf0c6f
Change-Id: I316e79c7c6d45e2ccbfff4065137cc3ef9d2738e
This commit is contained in:
@@ -35,10 +35,10 @@ endif
|
|||||||
# Conditional to building on linux, as dex2oat currently does not work on darwin.
|
# Conditional to building on linux, as dex2oat currently does not work on darwin.
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
WITH_DEXPREOPT ?= true
|
WITH_DEXPREOPT ?= true
|
||||||
# For an eng build only pre-opt the boot image. This gives reasonable performance and still
|
# For an eng build only pre-opt the boot image and system server. This gives reasonable performance
|
||||||
# allows a simple workflow: building in frameworks/base and syncing.
|
# and still allows a simple workflow: building in frameworks/base and syncing.
|
||||||
ifeq (eng,$(TARGET_BUILD_VARIANT))
|
ifeq (eng,$(TARGET_BUILD_VARIANT))
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY ?= true
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= true
|
||||||
endif
|
endif
|
||||||
# Add mini-debug-info to the boot classpath unless explicitly asked not to.
|
# Add mini-debug-info to the boot classpath unless explicitly asked not to.
|
||||||
ifneq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
|
ifneq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
|
||||||
|
@@ -33,9 +33,12 @@ endif
|
|||||||
ifeq (,$(strip $(built_dex)$(my_prebuilt_src_file)$(LOCAL_SOONG_DEX_JAR))) # contains no java code
|
ifeq (,$(strip $(built_dex)$(my_prebuilt_src_file)$(LOCAL_SOONG_DEX_JAR))) # contains no java code
|
||||||
LOCAL_DEX_PREOPT :=
|
LOCAL_DEX_PREOPT :=
|
||||||
endif
|
endif
|
||||||
# if WITH_DEXPREOPT_BOOT_IMG_ONLY=true and module is not in boot class path skip
|
# if WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true and module is not in boot class path skip
|
||||||
ifeq (true,$(WITH_DEXPREOPT_BOOT_IMG_ONLY))
|
# Also preopt system server jars since selinux prevents system server from loading anything from
|
||||||
ifeq ($(filter $(DEXPREOPT_BOOT_JARS_MODULES),$(LOCAL_MODULE)),)
|
# /data. If we don't do this they will need to be extracted which is not favorable for RAM usage
|
||||||
|
# or performance.
|
||||||
|
ifeq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
|
||||||
|
ifeq ($(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(DEXPREOPT_BOOT_JARS_MODULES),$(LOCAL_MODULE)),)
|
||||||
LOCAL_DEX_PREOPT :=
|
LOCAL_DEX_PREOPT :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@@ -303,7 +303,7 @@ _product_stash_var_list += \
|
|||||||
_product_stash_var_list += \
|
_product_stash_var_list += \
|
||||||
DEFAULT_SYSTEM_DEV_CERTIFICATE \
|
DEFAULT_SYSTEM_DEV_CERTIFICATE \
|
||||||
WITH_DEXPREOPT \
|
WITH_DEXPREOPT \
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY \
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY \
|
||||||
WITH_DEXPREOPT_APP_IMAGE
|
WITH_DEXPREOPT_APP_IMAGE
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -34,7 +34,7 @@ USE_CAMERA_STUB := true
|
|||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
ifeq ($(WITH_DEXPREOPT),)
|
ifeq ($(WITH_DEXPREOPT),)
|
||||||
WITH_DEXPREOPT := true
|
WITH_DEXPREOPT := true
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY := false
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ USE_CAMERA_STUB := true
|
|||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
ifeq ($(WITH_DEXPREOPT),)
|
ifeq ($(WITH_DEXPREOPT),)
|
||||||
WITH_DEXPREOPT := true
|
WITH_DEXPREOPT := true
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY := false
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ USE_CAMERA_STUB := true
|
|||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
ifeq ($(WITH_DEXPREOPT),)
|
ifeq ($(WITH_DEXPREOPT),)
|
||||||
WITH_DEXPREOPT := true
|
WITH_DEXPREOPT := true
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY := false
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -57,7 +57,7 @@ USE_CAMERA_STUB := true
|
|||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
ifeq ($(WITH_DEXPREOPT),)
|
ifeq ($(WITH_DEXPREOPT),)
|
||||||
WITH_DEXPREOPT := true
|
WITH_DEXPREOPT := true
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY := false
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ USE_CAMERA_STUB := true
|
|||||||
# of an SDK AVD. Note that this operation only works on Linux for now
|
# of an SDK AVD. Note that this operation only works on Linux for now
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
WITH_DEXPREOPT ?= true
|
WITH_DEXPREOPT ?= true
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY ?= false
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET_USES_HWC2 := true
|
TARGET_USES_HWC2 := true
|
||||||
|
@@ -28,7 +28,7 @@ USE_CAMERA_STUB := true
|
|||||||
# of an SDK AVD. Note that this operation only works on Linux for now
|
# of an SDK AVD. Note that this operation only works on Linux for now
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
WITH_DEXPREOPT ?= true
|
WITH_DEXPREOPT ?= true
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY ?= false
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET_USES_HWC2 := true
|
TARGET_USES_HWC2 := true
|
||||||
|
@@ -39,7 +39,7 @@ USE_CAMERA_STUB := true
|
|||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
ifeq ($(WITH_DEXPREOPT),)
|
ifeq ($(WITH_DEXPREOPT),)
|
||||||
WITH_DEXPREOPT := true
|
WITH_DEXPREOPT := true
|
||||||
WITH_DEXPREOPT_BOOT_IMG_ONLY := false
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user