summaryrefslogtreecommitdiffstats
path: root/core/executable.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-02-10 22:26:23 -0800
committerYing Wang <wangying@google.com>2014-02-10 22:39:14 -0800
commit14a6cbd9026659b30f63c31e112d6cce9b47a9d6 (patch)
tree2c48873af9b17f9aa39fb80cf5ca92978242b4b0 /core/executable.mk
parent145562fcef979e4fea946987717618dba6148aeb (diff)
downloadbuild-14a6cbd9026659b30f63c31e112d6cce9b47a9d6.zip
build-14a6cbd9026659b30f63c31e112d6cce9b47a9d6.tar.gz
build-14a6cbd9026659b30f63c31e112d6cce9b47a9d6.tar.bz2
Refine module name resolving in multilib build
-- Added TARGET_PREFER_32_BIT, which sets LOCAL_32_BIT_ONLY for an executable, if LOCAL_NO_2ND_ARCH is not true. Name resolving in 64-bit multilib build: -- Name resolving in PRODUCT_PACKAGES: foo:32 resolves to foo_32; foo:64 resolves to foo; foo resolves to both foo and foo_32 (if foo_32 is defined). -- Name resolving for LOCAL_REQUIRED_MODULES: If a module is built for 2nd arch, its required module resolves to 32-bit variant, if it exits; Otherwise for executable and shared library, a required module resolves to the default 64-bit variant; for other module classes, required module foo resolves to both foo and foo_32 (if foo_32 is defined) Bug: 12898862 Change-Id: I5fda1a77f58814097b10b5ad2743ee25adfaecc4
Diffstat (limited to 'core/executable.mk')
-rw-r--r--core/executable.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/executable.mk b/core/executable.mk
index 6d8734e..65319ef 100644
--- a/core/executable.mk
+++ b/core/executable.mk
@@ -3,6 +3,12 @@
# By default, an executable is built for TARGET_ARCH.
# To build it for TARGET_2ND_ARCH in a 64bit product, use "LOCAL_32_BIT_ONLY := true".
+ifeq ($(TARGET_PREFER_32_BIT),true)
+ifneq ($(LOCAL_NO_2ND_ARCH),true)
+LOCAL_32_BIT_ONLY := true
+endif
+endif
+
ifeq ($(TARGET_IS_64_BIT)|$(LOCAL_32_BIT_ONLY),true|true)
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
else