From 17210f0b8de483ba0d44d8187fc6c69f73fbdd7d Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 28 Sep 2011 22:54:08 +0200 Subject: [PATCH] Cherrypick 944311 from master. do not merge. emulator: Enable dex-preoptimization in emulator-specific builds This patch re-enables dex preoptimization in emulator-specific builds. This considerably speeds up the first-boot of SDK AVDs since the dex optimization pass is performed during the build instead. This was enabled in a previous patch, then reverted due to a bug in the build system that has been fixed since. This patch doesn't affect any device build. Change-Id: Ie711fb4e1672993b7f7f4b8c5313a89d0b8734d6 --- target/board/generic/BoardConfig.mk | 6 ++++++ target/board/generic_x86/BoardConfig.mk | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk index f247bcad8..229ea9c3e 100644 --- a/target/board/generic/BoardConfig.mk +++ b/target/board/generic/BoardConfig.mk @@ -31,5 +31,11 @@ USE_CAMERA_STUB := true # Set /system/bin/sh to ash, not mksh, to make sure we can switch back. TARGET_SHELL := ash +# Enable dex-preoptimization to speed up the first boot sequence +# of an SDK AVD. Note that this operation only works on Linux for now +ifeq ($(HOST_OS),linux) +WITH_DEXPREOPT := true +endif + # Build OpenGLES emulation guest and host libraries BUILD_EMULATOR_OPENGL := true diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk index 84b28ca42..1a1bc8025 100644 --- a/target/board/generic_x86/BoardConfig.mk +++ b/target/board/generic_x86/BoardConfig.mk @@ -21,5 +21,11 @@ USE_CAMERA_STUB := true # Set /system/bin/sh to ash, not mksh, to make sure we can switch back. TARGET_SHELL := ash +# Enable dex-preoptimization to speed up the first boot sequence +# of an SDK AVD. Note that this operation only works on Linux for now +ifeq ($(HOST_OS),linux) +WITH_DEXPREOPT := true +endif + # Build OpenGLES emulation host and guest libraries BUILD_EMULATOR_OPENGL := true