From a3339e98e667124717968a54f8324f293a9c2b72 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 30 Apr 2014 18:09:13 -0700 Subject: [PATCH] build: split TARGET_PREFER_32_BIT for apps and executables Introduce two new flags, TARGET_PREFER_32_BIT_APPS and TARGET_PREFER_32_BIT_EXECUTABLES that individually control compilation of apps and executables. If TARGET_PREFER_32_BIT is set, the build system will automatically set both new flags. Change-Id: Ibd2165e688675c2884d9e7ddf82d7dd6c28521f3 --- core/config.mk | 5 +++++ core/executable.mk | 6 +++--- core/package.mk | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/config.mk b/core/config.mk index 4e65049d2..0be56c72d 100644 --- a/core/config.mk +++ b/core/config.mk @@ -231,6 +231,11 @@ combo_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) include $(BUILD_SYSTEM)/combo/select.mk endif +ifdef TARGET_PREFER_32_BIT +TARGET_PREFER_32_BIT_APPS := true +TARGET_PREFER_32_BIT_EXECUTABLES := true +endif + # "ro.product.cpu.abilist" is a comma separated list of ABIs (in order # of preference) that the target supports. If a TARGET_CPU_ABI_LIST # is specified by the board configuration, we use that. If not, we diff --git a/core/executable.mk b/core/executable.mk index b67ac363a..7a3e08e0d 100644 --- a/core/executable.mk +++ b/core/executable.mk @@ -19,9 +19,9 @@ else #!LOCAL_MULTILIB == both LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true endif -# if TARGET_PREFER_32_BIT is set, try to build 32-bit first +# if TARGET_PREFER_32_BIT_EXECUTABLES is set, try to build 32-bit first ifdef TARGET_2ND_ARCH -ifeq ($(TARGET_PREFER_32_BIT),true) +ifeq ($(TARGET_PREFER_32_BIT_EXECUTABLES),true) LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) else LOCAL_2ND_ARCH_VAR_PREFIX := @@ -45,7 +45,7 @@ ifndef my_skip_non_preferred_arch ifdef TARGET_2ND_ARCH # check if the non-preferred arch is the primary or secondary -ifeq ($(TARGET_PREFER_32_BIT),true) +ifeq ($(TARGET_PREFER_32_BIT_EXECUTABLES),true) LOCAL_2ND_ARCH_VAR_PREFIX := else LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) diff --git a/core/package.mk b/core/package.mk index fe4d0e4df..c7d68d95e 100644 --- a/core/package.mk +++ b/core/package.mk @@ -40,9 +40,9 @@ endif LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true -# if TARGET_PREFER_32_BIT is set, try to build 32-bit first +# if TARGET_PREFER_32_BIT_APPS is set, try to build 32-bit first ifdef TARGET_2ND_ARCH -ifeq ($(TARGET_PREFER_32_BIT),true) +ifeq ($(TARGET_PREFER_32_BIT_APPS),true) LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) else LOCAL_2ND_ARCH_VAR_PREFIX := @@ -56,7 +56,7 @@ ifeq ($(my_module_arch_supported),true) include $(BUILD_SYSTEM)/package_internal.mk else ifneq (,$(TARGET_2ND_ARCH)) # check if the non-preferred arch is the primary or secondary -ifeq ($(TARGET_PREFER_32_BIT),true) +ifeq ($(TARGET_PREFER_32_BIT_APPS),true) LOCAL_2ND_ARCH_VAR_PREFIX := else LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)