From 847b00bf1b78d84b01af586aa882c8f6bc21861c Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 15 Oct 2015 20:43:29 -0700 Subject: [PATCH] Build: Fix DEX2OAT_TARGET_CPU_VARIANT setting The secondary variant fallback was not set. The build system expects the variants, so system properties were malformed for x86-64: [dalvik.vm.isa.x86.variant]: [dalvik.vm.isa.x86.features=default] Bug: 24989387 Change-Id: Idbf54f81494f2650ad56080305807fd6b7ed4161 --- core/config.mk | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/core/config.mk b/core/config.mk index 1db3d7ae4..5bfca172b 100644 --- a/core/config.mk +++ b/core/config.mk @@ -645,21 +645,14 @@ ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),) endif # Flags for DEX2OAT +first_non_empty_of_three = $(if $(1),$(1),$(if $(2),$(2),$(3))) DEX2OAT_TARGET_ARCH := $(TARGET_ARCH) -ifeq ($(TARGET_CPU_VARIANT),) -ifeq ($(TARGET_ARCH_VARIANT),) -DEX2OAT_TARGET_CPU_VARIANT := default -else -DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_ARCH_VARIANT) -endif -else -DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_CPU_VARIANT) -endif +DEX2OAT_TARGET_CPU_VARIANT := $(call first_non_empty_of_three,$(TARGET_CPU_VARIANT),$(TARGET_ARCH_VARIANT),default) DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default ifdef TARGET_2ND_ARCH $(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH := $(TARGET_2ND_ARCH) -$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_2ND_CPU_VARIANT) +$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT := $(call first_non_empty_of_three,$(TARGET_2ND_CPU_VARIANT),$(TARGET_2ND_ARCH_VARIANT),default) $(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default endif