diff --git a/core/executable_prefer_symlink.mk b/core/executable_prefer_symlink.mk index 2f04d0dab..fa49e4020 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 diff --git a/target/product/sdk_arm64.mk b/target/product/sdk_arm64.mk index 582a7791e..6b177e8f7 100644 --- a/target/product/sdk_arm64.mk +++ b/target/product/sdk_arm64.mk @@ -20,6 +20,7 @@ # entirely appropriate to inherit from for on-device configurations. $(call inherit-product, $(SRC_TARGET_DIR)/product/sdk.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) # Overrides PRODUCT_BRAND := generic_arm64 diff --git a/target/product/sdk_mips64.mk b/target/product/sdk_mips64.mk index c00de062f..d5ab8246c 100644 --- a/target/product/sdk_mips64.mk +++ b/target/product/sdk_mips64.mk @@ -20,6 +20,7 @@ # entirely appropriate to inherit from for on-device configurations. $(call inherit-product, $(SRC_TARGET_DIR)/product/sdk.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) # Overrides PRODUCT_BRAND := generic_mips64 diff --git a/target/product/sdk_x86_64.mk b/target/product/sdk_x86_64.mk index 3816cf94a..d50d1c43c 100644 --- a/target/product/sdk_x86_64.mk +++ b/target/product/sdk_x86_64.mk @@ -20,6 +20,7 @@ # entirely appropriate to inherit from for on-device configurations. $(call inherit-product, $(SRC_TARGET_DIR)/product/sdk.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) # Overrides PRODUCT_BRAND := generic_x86_64