am 735628e8: am 2ff8919d: Merge changes I7e809264,I504cea21,Ibd2165e6

* commit '735628e8d19fae51574bd5057c142db56797a2b0':
  build: add core_64_bit.mk
  build: reverse abi list when TARGET_PREFER_32_BIT_APPS is set
  build: split TARGET_PREFER_32_BIT for apps and executables
This commit is contained in:
Colin Cross 2014-05-05 20:18:09 +00:00 committed by Android Git Automerger
commit 6f9166640a
7 changed files with 74 additions and 19 deletions

View File

@ -231,12 +231,13 @@ combo_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
include $(BUILD_SYSTEM)/combo/select.mk
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
# build a list out of the TARGET_CPU_ABIs specified by the config.
ifeq (,$(TARGET_CPU_ABI_LIST))
TARGET_CPU_ABI_LIST := $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2) $(TARGET_2ND_CPU_ABI) $(TARGET_2ND_CPU_ABI2)
ifdef TARGET_PREFER_32_BIT
TARGET_PREFER_32_BIT_APPS := true
TARGET_PREFER_32_BIT_EXECUTABLES := true
endif
ifeq (,$(TARGET_SUPPORTS_32_BIT_APPS)$(TARGET_SUPPORTS_64_BIT_APPS))
TARGET_SUPPORTS_32_BIT_APPS := true
endif
# "ro.product.cpu.abilist32" and "ro.product.cpu.abilist64" are
@ -249,7 +250,7 @@ endif
# is always 32 bits. If this isn't the case, these variables should
# be overriden in the boarc configuration.
ifeq (,$(TARGET_CPU_ABI_LIST_64_BIT))
ifeq (true,$(TARGET_IS_64_BIT))
ifeq (true|true,$(TARGET_IS_64_BIT)|$(TARGET_SUPPORTS_64_BIT_APPS))
TARGET_CPU_ABI_LIST_64_BIT := $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2)
endif
endif
@ -258,9 +259,23 @@ ifeq (,$(TARGET_CPU_ABI_LIST_32_BIT))
ifneq (true,$(TARGET_IS_64_BIT))
TARGET_CPU_ABI_LIST_32_BIT := $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2)
else
# For a 64 bit target, assume that the 2ND_CPU_ABI
# is a 32 bit ABI.
TARGET_CPU_ABI_LIST_32_BIT := $(TARGET_2ND_CPU_ABI) $(TARGET_2ND_CPU_ABI2)
ifeq (true,$(TARGET_SUPPORTS_32_BIT_APPS))
# For a 64 bit target, assume that the 2ND_CPU_ABI
# is a 32 bit ABI.
TARGET_CPU_ABI_LIST_32_BIT := $(TARGET_2ND_CPU_ABI) $(TARGET_2ND_CPU_ABI2)
endif
endif
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
# build a list out of the TARGET_CPU_ABIs specified by the config.
ifeq (,$(TARGET_CPU_ABI_LIST))
ifeq ($(TARGET_IS_64_BIT)|$(TARGET_PREFER_32_BIT_APPS),true|true)
TARGET_CPU_ABI_LIST := $(TARGET_CPU_ABI_LIST_32_BIT) $(TARGET_CPU_ABI_LIST_64_BIT)
else
TARGET_CPU_ABI_LIST := $(TARGET_CPU_ABI_LIST_64_BIT) $(TARGET_CPU_ABI_LIST_32_BIT)
endif
endif

View File

@ -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)

View File

@ -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)

View File

@ -19,6 +19,7 @@
# build quite specifically for the emulator, and might not be
# entirely appropriate to inherit from for on-device configurations.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)

View File

@ -0,0 +1,40 @@
#
# Copyright (C) 2014 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit from this product for devices that support 64-bit apps using:
# $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
# The inheritance for this must come before the inheritance chain that leads
# to core_minimal.mk
# For now this will allow 64-bit apps, but still compile all apps with JNI
# for 32-bit only.
# Copy the 32-bit primary, 64-bit secondary zygote startup script
PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
# Set the zygote property to select the 32-bit primary, 64-bit secondary script
# This line must be parsed before the one in core_minimal.mk
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32_64
# Temporary hack to prefer launching processes as 32 bit
# instead of 64 bit.
#
# STOPSHIP: Revert this to allow products to select it themselves
TARGET_PREFER_32_BIT_APPS := true
# Temporarily leave these unset to keep all apps with JNI building as 32-bit
# TARGET_SUPPORTS_32_BIT_APPS := true
# TARGET_SUPPORTS_64_BIT_APPS := true

View File

@ -19,6 +19,7 @@
# mips64 build quite specifically for the emulator, and might not be
# entirely appropriate to inherit from for on-device configurations.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_mips64/device.mk)

View File

@ -23,9 +23,7 @@
# that isn't a wifi connection. This will instruct init.rc to enable the
# network connection so that you can use it with ADB
# Override and force 64-bit Zygote. Must come first.
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk)