summaryrefslogtreecommitdiffstats
path: root/core/executable_prefer_symlink.mk
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-06-17 16:36:08 +0100
committerNarayan Kamath <narayan@google.com>2014-06-17 17:02:51 +0100
commit79bc52af37dd796f0588a03dc317d46b461b8e5d (patch)
tree39e8944b648264738a3351731ae81c3d02169c90 /core/executable_prefer_symlink.mk
parentb75b32830c2e99dae90ab1915e74c1b3ec592e39 (diff)
downloadbuild-79bc52af37dd796f0588a03dc317d46b461b8e5d.zip
build-79bc52af37dd796f0588a03dc317d46b461b8e5d.tar.gz
build-79bc52af37dd796f0588a03dc317d46b461b8e5d.tar.bz2
Fix issue in symlinking 64 bit executables.
We were not inspecting the value of TARGET_SUPPORTS_{32,64}_BIT_APPS so we'd sometimes create the wrong symlink if TARGET_IS_64_BIT was true. bug: 15661143 Change-Id: I2a6eb3278445fcd14bc9dc9312f41f972ea77971
Diffstat (limited to 'core/executable_prefer_symlink.mk')
-rw-r--r--core/executable_prefer_symlink.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/executable_prefer_symlink.mk b/core/executable_prefer_symlink.mk
index 2f04d0d..fa49e40 100644
--- a/core/executable_prefer_symlink.mk
+++ b/core/executable_prefer_symlink.mk
@@ -10,9 +10,20 @@ my_symlink := $(addprefix $(TARGET_OUT)/bin/, $(LOCAL_MODULE))
# check because 32 bit targets may not define TARGET_PREFER_32_BIT_APPS
# et al. since those variables make no sense in that context.
ifeq ($(TARGET_IS_64_BIT),true)
-ifneq ($(TARGET_PREFER_32_BIT_APPS),true)
+ifeq ($(TARGET_SUPPORTS_64_BIT_APPS)|$(TARGET_SUPPORTS_32_BIT_APPS),true|true)
+ # We support both 32 and 64 bit apps, so we will have to
+ # base our decision on whether the target prefers one or the
+ # other.
+ ifneq ($(TARGET_PREFER_32_BIT_APPS),true)
+ $(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_32)
+ else
+ $(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_64)
+ endif
+else ifeq ($(TARGET_SUPPORTS_64_BIT_APPS),true)
+ # We support only 64 bit apps.
$(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_64)
else
+ # We support only 32 bit apps.
$(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_32)
endif
else