From 5a9cef81718465118662b22cfa616457cf91b27a Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 16 Apr 2014 15:03:11 -0700 Subject: [PATCH] Build dex2oat as 64b for the target when using zygote64 In single-zygote 64b builds we should build dex2oat as 64b to avoid installd issues Change-Id: I5f281d90fbd44abbca4182e39162b184be9f1b35 --- dex2oat/Android.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dex2oat/Android.mk b/dex2oat/Android.mk index 038f0a77f..c17788ed9 100644 --- a/dex2oat/Android.mk +++ b/dex2oat/Android.mk @@ -21,11 +21,19 @@ include art/build/Android.executable.mk DEX2OAT_SRC_FILES := \ dex2oat.cc +# TODO: Remove this when the framework (installd) supports pushing the +# right instruction-set parameter for the primary architecture. +ifneq ($(filter ro.zygote=zygote64,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES)),) + dex2oat_arch := 64 +else + dex2oat_arch := 32 +endif + ifeq ($(ART_BUILD_TARGET_NDEBUG),true) - $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libcutils libart-compiler,art/compiler,target,ndebug,32)) + $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libcutils libart-compiler,art/compiler,target,ndebug,$(dex2oat_arch))) endif ifeq ($(ART_BUILD_TARGET_DEBUG),true) - $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libcutils libartd-compiler,art/compiler,target,debug,32)) + $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libcutils libartd-compiler,art/compiler,target,debug,$(dex2oat_arch))) endif ifeq ($(WITH_HOST_DALVIK),true) -- 2.11.0