summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-12-16 21:47:13 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-16 21:47:13 +0000
commit912da64598a5175d6e5868c22977eda95f2a9df1 (patch)
tree76d95c503daa22d6faf6fe895c57792c76d5abe3
parentc38439a5fff55322900948cb36c2cf6f38b50bb3 (diff)
parent73a730caf566fb778ad36f6d991666c482918d22 (diff)
downloadbuild-912da64598a5175d6e5868c22977eda95f2a9df1.tar.gz
build-912da64598a5175d6e5868c22977eda95f2a9df1.tar.bz2
build-912da64598a5175d6e5868c22977eda95f2a9df1.zip
am 73a730ca: Merge "Remove libdvm support from the core build system."
* commit '73a730caf566fb778ad36f6d991666c482918d22': Remove libdvm support from the core build system.
-rw-r--r--core/dex_preopt.mk9
-rw-r--r--core/dex_preopt_odex_install.mk15
-rw-r--r--core/java_library.mk6
-rw-r--r--core/main.mk12
-rw-r--r--core/product.mk1
-rw-r--r--core/product_config.mk30
-rw-r--r--target/product/core_minimal.mk3
-rw-r--r--target/product/core_tiny.mk3
-rw-r--r--target/product/full_mips64.mk2
-rwxr-xr-xtarget/product/full_x86_64.mk2
-rw-r--r--target/product/runtime_common.mk41
-rw-r--r--target/product/runtime_libart.mk34
-rw-r--r--target/product/runtime_libart_default.mk21
-rw-r--r--target/product/runtime_libdvm.mk24
-rw-r--r--target/product/runtime_libdvm_default.mk21
15 files changed, 38 insertions, 186 deletions
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 231a04e5f..8b555e090 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -3,8 +3,6 @@
#
####################################
-ifneq ($(DALVIK_VM_LIB),)
-
# list of boot classpath jars for dexpreopt
DEXPREOPT_BOOT_JARS := $(subst $(space),:,$(PRODUCT_BOOT_JARS))
DEXPREOPT_BOOT_JARS_MODULES := $(PRODUCT_BOOT_JARS)
@@ -18,6 +16,9 @@ DEXPREOPT_PRODUCT_DIR := $(patsubst $(DEXPREOPT_BUILD_DIR)/%,%,$(DEXPREOPT_PRODU
DEXPREOPT_BOOT_JAR_DIR := system/framework
DEXPREOPT_BOOT_JAR_DIR_FULL_PATH := $(DEXPREOPT_PRODUCT_DIR_FULL_PATH)/$(DEXPREOPT_BOOT_JAR_DIR)
+# The default value for LOCAL_DEX_PREOPT
+DEX_PREOPT_DEFAULT ?= true
+
# $(1): the .jar or .apk to remove classes.dex
define dexpreopt-remove-classes.dex
$(hide) zip --quiet --delete $(1) classes.dex; \
@@ -60,7 +61,3 @@ DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT := $(DEFAULT_DEX_PREOPT_BUILT_IM
ifdef TARGET_2ND_ARCH
$(TARGET_2ND_ARCH_VAR_PREFIX)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT := $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
endif # TARGET_2ND_ARCH
-else
-$(warning No DALVIK_VM_LIB, disable dexpreopt.)
-WITH_DEXPREOPT := false
-endif # DALVIK_VM_LIB is defined.
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 20bbe78b1..aef5cd185 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -46,26 +46,12 @@ built_installed_odex :=
ifdef LOCAL_DEX_PREOPT
dexpreopt_boot_jar_module := $(filter $(DEXPREOPT_BOOT_JARS_MODULES),$(LOCAL_MODULE))
ifdef dexpreopt_boot_jar_module
-ifeq ($(DALVIK_VM_LIB),libdvm.so)
-built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex
-installed_odex := $(basename $(LOCAL_INSTALLED_MODULE)).odex
-built_installed_odex := $(built_odex):$(installed_odex)
-else # libdvm.so
# For libart, the boot jars' odex files are replaced by $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE).
# We use this installed_odex trick to get boot.art installed.
installed_odex := $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
# Append the odex for the 2nd arch if we have one.
installed_odex += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
-endif # libdvm.so
else # boot jar
-ifeq ($(DALVIK_VM_LIB),libdvm.so)
-built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex
-installed_odex := $(basename $(LOCAL_INSTALLED_MODULE)).odex
-built_installed_odex := $(built_odex):$(installed_odex)
-
-$(built_odex) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
- $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS)
-else # libart
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
# For a Java library, we build odex for both 1st arch and 2nd arch, if we have one.
# #################################################
@@ -91,7 +77,6 @@ include $(BUILD_SYSTEM)/setup_one_odex.mk
endif # LOCAL_MULTILIB is both
endif # TARGET_2ND_ARCH
endif # LOCAL_MODULE_CLASS
-endif # libart
endif # boot jar
ifdef built_odex
diff --git a/core/java_library.mk b/core/java_library.mk
index dffc7d90a..5f7c784ac 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -85,12 +85,6 @@ $(LOCAL_BUILT_MODULE) : $(dexpreopted_boot_jar) | $(ACP)
$(call copy-file-to-target)
# For libart boot jars, we don't have .odex files.
-ifeq ($(DALVIK_VM_LIB),libdvm.so)
-dexpreopted_boot_odex := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(dexpreopt_boot_jar_module).odex
-$(built_odex) : $(dexpreopted_boot_odex) | $(ACP)
- $(call copy-file-to-target)
-endif
-
else # ! boot jar
$(built_odex): PRIVATE_MODULE := $(LOCAL_MODULE)
# Use pattern rule - we may have multiple built odex files.
diff --git a/core/main.mk b/core/main.mk
index 53df32c06..4fbd01e2f 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -307,6 +307,7 @@ endif
# Add build properties for ART. These define system properties used by installd
# to pass flags to dex2oat.
+ADDITIONAL_BUILD_PROPERTIES += persist.sys.dalvik.vm.lib.2=libart
ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_ARCH).variant=$(DEX2OAT_TARGET_CPU_VARIANT)
ifneq ($(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES),)
ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.isa.$(TARGET_ARCH).features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES)
@@ -336,15 +337,14 @@ ifneq (,$(user_variant))
enable_target_debugging :=
endif
- # Turn on Dalvik preoptimization for libdvm.so user builds, but only if not
+ # Turn on Dalvik preoptimization for user builds, but only if not
# explicitly disabled and the build is running on Linux (since host
# Dalvik isn't built for non-Linux hosts).
ifeq (,$(WITH_DEXPREOPT))
- ifeq ($(DALVIK_VM_LIB),libdvm.so)
- ifeq ($(user_variant),user)
- ifeq ($(HOST_OS),linux)
- WITH_DEXPREOPT := true
- endif
+ ifeq ($(user_variant),user)
+ ifeq ($(HOST_OS),linux)
+ # TODO: turn on WITH_DEXPREOPT for libart user builds.
+ # WITH_DEXPREOPT := true
endif
endif
endif
diff --git a/core/product.mk b/core/product.mk
index 153629cdf..6a1091a0f 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -99,7 +99,6 @@ _product_var_list := \
PRODUCT_VENDOR_KERNEL_HEADERS \
PRODUCT_FACTORY_RAMDISK_MODULES \
PRODUCT_FACTORY_BUNDLE_MODULES \
- PRODUCT_RUNTIMES \
PRODUCT_BOOT_JARS \
PRODUCT_SUPPORTS_VERITY \
PRODUCT_OEM_PROPERTIES \
diff --git a/core/product_config.mk b/core/product_config.mk
index e59aee158..7476e0935 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -248,36 +248,6 @@ all_product_configs :=
#############################################################################
-# TODO: Remove this hack once only 1 runtime is left.
-# Include the runtime product makefile based on the product's PRODUCT_RUNTIMES
-$(call clear-var-list, $(_product_var_list))
-
-# Set PRODUCT_RUNTIMES, allowing buildspec to override using OVERRIDE_RUNTIMES
-product_runtimes := $(sort $(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))
-$(foreach v, $(_product_var_list), $(if $($(v)),\
- $(eval PRODUCTS.$(INTERNAL_PRODUCT).$(v) += $(sort $($(v))))))
-
-$(call clear-var-list, $(_product_var_list))
-# Now we can assign to PRODUCT_RUNTIMES
-PRODUCT_RUNTIMES := $(product_runtimes)
-product_runtimes :=
-
-PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PROPERTY_OVERRIDES += persist.sys.dalvik.vm.lib.2=$(DALVIK_VM_LIB)
-
-ifeq ($(words $(PRODUCT_RUNTIMES)),1)
- # If we only have one runtime, we can strip classes.dex by default during dex_preopt
- DEX_PREOPT_DEFAULT := true
-else
- # If we have more than one, we leave the classes.dex alone for post-boot analysis
- DEX_PREOPT_DEFAULT := nostripping
-endif
-
-#############################################################################
# A list of module names of BOOTCLASSPATH (jar files)
PRODUCT_BOOT_JARS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BOOT_JARS))
diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk
index 4c08cb027..9c5a13b0c 100644
--- a/target/product/core_minimal.mk
+++ b/target/product/core_minimal.mk
@@ -100,11 +100,10 @@ PRODUCT_SYSTEM_SERVER_JARS := \
ethernet-service \
wifi-service
-PRODUCT_RUNTIMES := runtime_libart_default
-
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.zygote=zygote32
PRODUCT_COPY_FILES += \
system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc
+$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk)
diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk
index 9637e3413..39789d9cf 100644
--- a/target/product/core_tiny.mk
+++ b/target/product/core_tiny.mk
@@ -101,8 +101,6 @@ PRODUCT_SYSTEM_SERVER_JARS := \
services \
wifi-service
-PRODUCT_RUNTIMES := runtime_libart_default
-
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.zygote=zygote32
PRODUCT_COPY_FILES += \
@@ -111,6 +109,7 @@ PRODUCT_COPY_FILES += \
PRODUCT_PROPERTY_OVERRIDES += \
ro.carrier=unknown
+$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk)
$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
diff --git a/target/product/full_mips64.mk b/target/product/full_mips64.mk
index 408e81c10..e813e41b3 100644
--- a/target/product/full_mips64.mk
+++ b/target/product/full_mips64.mk
@@ -23,8 +23,6 @@ $(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)
-PRODUCT_RUNTIMES := runtime_libart_default
-
include $(SRC_TARGET_DIR)/product/emulator.mk
# Overrides
diff --git a/target/product/full_x86_64.mk b/target/product/full_x86_64.mk
index d9c0c1ea5..051a86ed6 100755
--- a/target/product/full_x86_64.mk
+++ b/target/product/full_x86_64.mk
@@ -27,8 +27,6 @@ $(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)
-PRODUCT_RUNTIMES := runtime_libart_default
-
include $(SRC_TARGET_DIR)/product/emulator.mk
ifdef NET_ETH0_STARTONBOOT
diff --git a/target/product/runtime_common.mk b/target/product/runtime_common.mk
deleted file mode 100644
index 9ae182a37..000000000
--- a/target/product/runtime_common.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# 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.
-#
-
-# Common runtime modules for both Dalvik and ART
-
-PRODUCT_PACKAGES += \
- apache-xml \
- bouncycastle \
- cacerts \
- conscrypt \
- core-junit \
- dalvikvm \
- dexdeps \
- dexdump \
- dexlist \
- dmtracedump \
- dx \
- ext \
- hprof-conv \
- libcrypto \
- libexpat \
- libicui18n \
- libicuuc \
- libjavacore \
- libnativehelper \
- libssl \
- libz \
- okhttp
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index e4200b30f..a35122b06 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -17,11 +17,33 @@
# Provides a functioning ART environment without Android frameworks
PRODUCT_PACKAGES += \
- core-libart \
- libart \
- dex2oat \
- oatdump \
- patchoat
+ apache-xml \
+ bouncycastle \
+ cacerts \
+ conscrypt \
+ core-junit \
+ core-libart \
+ dalvikvm \
+ dex2oat \
+ dexdeps \
+ dexdump \
+ dexlist \
+ dmtracedump \
+ dx \
+ ext \
+ hprof-conv \
+ libart \
+ libcrypto \
+ libexpat \
+ libicui18n \
+ libicuuc \
+ libjavacore \
+ libnativehelper \
+ libssl \
+ libz \
+ oatdump \
+ okhttp \
+ patchoat
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
dalvik.vm.image-dex2oat-Xms=64m \
@@ -29,5 +51,3 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
dalvik.vm.dex2oat-Xms=64m \
dalvik.vm.dex2oat-Xmx=512m \
ro.dalvik.vm.native.bridge=0 \
-
-include $(SRC_TARGET_DIR)/product/runtime_common.mk
diff --git a/target/product/runtime_libart_default.mk b/target/product/runtime_libart_default.mk
deleted file mode 100644
index 2d4c7934a..000000000
--- a/target/product/runtime_libart_default.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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
-
-DALVIK_VM_LIB := libart.so
-
-include $(SRC_TARGET_DIR)/product/runtime_libart.mk
diff --git a/target/product/runtime_libdvm.mk b/target/product/runtime_libdvm.mk
deleted file mode 100644
index 638d7d793..000000000
--- a/target/product/runtime_libdvm.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# 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
-
-include $(SRC_TARGET_DIR)/product/runtime_common.mk
diff --git a/target/product/runtime_libdvm_default.mk b/target/product/runtime_libdvm_default.mk
deleted file mode 100644
index b581ce5ec..000000000
--- a/target/product/runtime_libdvm_default.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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
-
-DALVIK_VM_LIB := libdvm.so
-
-include $(SRC_TARGET_DIR)/product/runtime_libdvm.mk