forked from openkylin/platform_build
Move from WITH_ART to PRODUCT_RUNTIMES
Change-Id: I3a9217b4aafc1f59d095169deb9eaeae17320505
This commit is contained in:
parent
fcec57a116
commit
1aeee8bb66
|
@ -104,9 +104,15 @@ ifndef ENABLE_SVG
|
|||
#ENABLE_SVG:=false
|
||||
endif
|
||||
|
||||
# To enable ART define WITH_ART:=true
|
||||
ifndef WITH_ART
|
||||
#WITH_ART:=true
|
||||
# OVERRIDE_RUNTIMES allows you to locally override PRODUCT_RUNTIMES.
|
||||
#
|
||||
# To only build ART, use "runtime_libart_default"
|
||||
# To use Dalvik but also include ART, use "runtime_libdvm_default runtime_libart"
|
||||
# To use ART but also include Dalvik, use "runtime_libart_default runtime_libdvm"
|
||||
ifndef OVERRIDE_RUNTIMES
|
||||
#OVERRIDE_RUNTIMES:=runtime_libart_default
|
||||
#OVERRIDE_RUNTIMES:=runtime_libdvm_default runtime_libart
|
||||
#OVERRIDE_RUNTIMES:=runtime_libart_default runtime_libdvm
|
||||
endif
|
||||
|
||||
# when the build system changes such that this file must be updated, this
|
||||
|
|
|
@ -123,7 +123,7 @@ TARGET_SHELL := mksh
|
|||
|
||||
# ---------------------------------------------------------------
|
||||
# Try to include buildspec.mk, which will try to set stuff up.
|
||||
# If this file doesn't exist, the environemnt variables will
|
||||
# If this file doesn't exist, the environment variables will
|
||||
# be used, and if that doesn't work, then the default is an
|
||||
# arm build
|
||||
ifndef ANDROID_BUILDSPEC
|
||||
|
|
|
@ -95,7 +95,8 @@ _product_var_list := \
|
|||
PRODUCT_RESTRICT_VENDOR_FILES \
|
||||
PRODUCT_VENDOR_KERNEL_HEADERS \
|
||||
PRODUCT_FACTORY_RAMDISK_MODULES \
|
||||
PRODUCT_FACTORY_BUNDLE_MODULES
|
||||
PRODUCT_FACTORY_BUNDLE_MODULES \
|
||||
PRODUCT_RUNTIMES
|
||||
|
||||
|
||||
define dump-product
|
||||
|
|
|
@ -170,10 +170,6 @@ ifeq ($(WITH_HOST_DALVIK),)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_ART),)
|
||||
WITH_ART := false
|
||||
endif
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Include the product definitions.
|
||||
# We need to do this to translate TARGET_PRODUCT into its
|
||||
|
@ -356,11 +352,6 @@ PRODUCT_TAGS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_TAGS))
|
|||
PRODUCT_VENDOR_KERNEL_HEADERS := \
|
||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VENDOR_KERNEL_HEADERS)
|
||||
|
||||
# Add the product-defined properties to the build properties.
|
||||
ADDITIONAL_BUILD_PROPERTIES := \
|
||||
$(ADDITIONAL_BUILD_PROPERTIES) \
|
||||
$(PRODUCT_PROPERTY_OVERRIDES)
|
||||
|
||||
# The OTA key(s) specified by the product config, if any. The names
|
||||
# of these keys are stored in the target-files zip so that post-build
|
||||
# signing tools can substitute them for the test key embedded by
|
||||
|
@ -370,3 +361,29 @@ PRODUCT_OTA_PUBLIC_KEYS := $(sort \
|
|||
|
||||
PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \
|
||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS))
|
||||
|
||||
# Set PRODUCT_RUNTIME, allowing buildspec to override using OVERRIDE_RUNTIMES
|
||||
PRODUCT_RUNTIMES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RUNTIMES))
|
||||
ifneq ($(OVERRIDE_RUNTIMES),)
|
||||
$(info Overriding PRODUCT_RUNTIMES=$(PRODUCT_RUNTIMES) with $(OVERRIDE_RUNTIMES))
|
||||
PRODUCT_RUNTIMES := $(OVERRIDE_RUNTIMES)
|
||||
endif
|
||||
$(foreach runtime, $(PRODUCT_RUNTIMES), $(eval include $(SRC_TARGET_DIR)/product/$(runtime).mk))
|
||||
PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES += $(PRODUCT_PACKAGES)
|
||||
PRODUCT_PACKAGES :=
|
||||
|
||||
# Add the product-defined properties to the build properties.
|
||||
#
|
||||
# Note that PRODUCT_PROPERTY_OVERRIDES can be extended by processing
|
||||
# the PRODUCT_PACKAGES which is why this is below that.
|
||||
#
|
||||
ADDITIONAL_BUILD_PROPERTIES := \
|
||||
$(ADDITIONAL_BUILD_PROPERTIES) \
|
||||
$(PRODUCT_PROPERTY_OVERRIDES)
|
||||
|
||||
# ************************************************************************
|
||||
# ADD NEW PRODUCT_* VARIABLES ABOVE PRODUCT_RUNTIMES
|
||||
#
|
||||
# This is because including the PRODUCT_RUNTIMES can add to other
|
||||
# PRODUCT_* variables.
|
||||
# ************************************************************************
|
||||
|
|
|
@ -57,5 +57,6 @@ PRODUCT_PACKAGES += \
|
|||
sensorservice \
|
||||
uiautomator
|
||||
|
||||
PRODUCT_RUNTIMES := runtime_libdvm_default
|
||||
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/dalvikvm.mk)
|
||||
|
|
|
@ -14,21 +14,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Provides a functioning dalvikvm without Android frameworks
|
||||
|
||||
ifeq ($(WITH_ART),false)
|
||||
PRODUCT_PACKAGES += \
|
||||
core \
|
||||
libdvm \
|
||||
dexopt
|
||||
else
|
||||
PRODUCT_PACKAGES += \
|
||||
core-libart \
|
||||
libart \
|
||||
dex2oat
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
dalvik.vm.lib=libart.so
|
||||
endif
|
||||
# Common runtime modules for both Dalvik and ART
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
apache-xml \
|
||||
|
@ -57,13 +43,6 @@ PRODUCT_PACKAGES += \
|
|||
|
||||
# host-only dependencies
|
||||
ifeq ($(WITH_HOST_DALVIK),true)
|
||||
ifeq ($(WITH_ART),false)
|
||||
PRODUCT_PACKAGES += \
|
||||
core-hostdex
|
||||
else
|
||||
PRODUCT_PACKAGES += \
|
||||
core-libart-hostdex
|
||||
endif
|
||||
PRODUCT_PACKAGES += \
|
||||
apache-xml-hostdex \
|
||||
bouncycastle-hostdex \
|
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# Copyright (C) 2013 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.
|
||||
#
|
||||
|
||||
# Provides a functioning ART environment without Android frameworks
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
core-libart \
|
||||
libart \
|
||||
dex2oat
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
dalvik.vm.lib=libart.so
|
||||
|
||||
# host-only dependencies
|
||||
ifeq ($(WITH_HOST_DALVIK),true)
|
||||
PRODUCT_PACKAGES += \
|
||||
core-libart-hostdex
|
||||
endif
|
||||
|
||||
include $(SRC_TARGET_DIR)/product/runtime_common.mk
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Copyright (C) 2013 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.
|
||||
#
|
||||
|
||||
# Set ART as the default runtime environment
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
dalvik.vm.lib=libart.so
|
||||
|
||||
include $(SRC_TARGET_DIR)/product/runtime_libart.mk
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Copyright (C) 2013 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.
|
||||
#
|
||||
|
||||
# Provides a functioning Dalvik environment without Android frameworks
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
core \
|
||||
libdvm \
|
||||
dexopt
|
||||
|
||||
# host-only dependencies
|
||||
ifeq ($(WITH_HOST_DALVIK),true)
|
||||
PRODUCT_PACKAGES += \
|
||||
core-hostdex
|
||||
endif
|
||||
|
||||
include $(SRC_TARGET_DIR)/product/runtime_common.mk
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Copyright (C) 2013 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.
|
||||
#
|
||||
|
||||
# Set Dalvik as the default runtime environment
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
dalvik.vm.lib=libdvm.so
|
||||
|
||||
include $(SRC_TARGET_DIR)/product/runtime_libdvm.mk
|
Loading…
Reference in New Issue