Merge changes from topic 'aosp-merge-24-12'

* changes:
  Temporary workaround to build bouncycastle / nist-pkits
  Build: Build changes for multi oat/image support.
  Allow modules to override the default NOTICE file.
  Track introduction of libopenjdkjvm.
  Allow for 5200 words in dump-words-to-file
  Update the package whitelist for the boot image.
  Use core-oj alongside core-libart wherever required.
This commit is contained in:
Narayan Kamath 2015-12-24 11:56:45 +00:00 committed by Gerrit Code Review
commit 8b9589216d
16 changed files with 61 additions and 14 deletions

View File

@ -187,6 +187,7 @@ LOCAL_SANITIZE_RECOVER:=
LOCAL_DBUS_PROXY_PREFIX:=
LOCAL_INIT_RC:=
LOCAL_MODULE_HOST_OS:=
LOCAL_NOTICE_FILE:=
# arch specific variables
LOCAL_SRC_FILES_$(TARGET_ARCH):=

View File

@ -706,7 +706,7 @@ endif
# allow overriding default Java libraries on a per-target basis
ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
TARGET_DEFAULT_JAVA_LIBRARIES := core-libart core-junit ext framework okhttp
TARGET_DEFAULT_JAVA_LIBRARIES := core-oj core-libart core-junit ext framework okhttp
endif
# Flags for DEX2OAT

View File

@ -1756,7 +1756,8 @@ define dump-words-to-file
@$(call emit-line,$(wordlist 4401,4600,$(1)),$(2))
@$(call emit-line,$(wordlist 4601,4800,$(1)),$(2))
@$(call emit-line,$(wordlist 4801,5000,$(1)),$(2))
@$(if $(wordlist 5001,5002,$(1)),$(error Too many words ($(words $(1)))))
@$(call emit-line,$(wordlist 5001,5200,$(1)),$(2))
@$(if $(wordlist 5201,5202,$(1)),$(error Too many words ($(words $(1)))))
endef
# For a list of jar files, unzip them to a specified directory,

View File

@ -97,5 +97,6 @@ $(hide) $(DEX2OAT) \
--instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
--include-patch-information --runtime-arg -Xnorelocate --no-generate-debug-info \
--abort-on-hard-verifier-error \
--no-inline-from=core-oj.jar \
$(PRIVATE_DEX_PREOPT_FLAGS)
endef

View File

@ -42,8 +42,8 @@ endif
# The rule to install boot.art and boot.oat
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) : $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) | $(ACP)
$(call copy-file-to-target)
$(hide) $(ACP) -fp $(patsubst %.art,%.oat,$<) $(patsubst %.art,%.oat,$@)
$(hide) $(ACP) -fp $(dir $<)/*.art $(dir $@)
$(hide) $(ACP) -fp $(dir $<)/*.oat $(dir $@)
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix)
# Use dex2oat debug version for better error reporting
@ -51,6 +51,9 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE
@echo "target dex2oat: $@"
@mkdir -p $(dir $@)
@mkdir -p $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))
@rm -f $(dir $@)/*.art $(dir $@)/*.oat
@rm -f $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))/*.art
@rm -f $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))/*.oat
$(hide) $(DEX2OAT) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) --runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
--image-classes=$(PRELOADED_CLASSES) \
$(addprefix --dex-file=,$(LIBART_TARGET_BOOT_DEX_FILES)) \
@ -63,4 +66,5 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE
--instruction-set-variant=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT) \
--instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
--android-root=$(PRODUCT_OUT)/system --include-patch-information --runtime-arg -Xnorelocate --no-generate-debug-info \
--multi-image --no-inline-from=core-oj.jar \
$(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(COMPILED_CLASSES_FLAGS)

View File

@ -73,8 +73,8 @@ ifneq ($(LOCAL_SDK_VERSION),)
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION))
endif
else
LOCAL_JAVA_LIBRARIES := core-libart ext framework $(LOCAL_JAVA_LIBRARIES)
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, core-libart)
LOCAL_JAVA_LIBRARIES := core-oj core-libart ext framework $(LOCAL_JAVA_LIBRARIES)
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, core-oj):$(call java-lib-files, core-libart)
endif # LOCAL_SDK_VERSION
LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))

View File

@ -28,6 +28,7 @@ include $(BUILD_SYSTEM)/host_java_library_common.mk
#######################################
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
LOCAL_JAVA_LIBRARIES += core-oj-hostdex
LOCAL_JAVA_LIBRARIES += core-libart-hostdex
endif

View File

@ -24,6 +24,7 @@ ifeq ($(HOST_OS),linux)
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_IS_STATIC_JAVA_LIBRARY := true
USE_CORE_LIB_BOOTCLASSPATH := true
LOCAL_JAVA_LIBRARIES += core-oj-hostdex
LOCAL_JAVA_LIBRARIES += core-libart-hostdex
intermediates.COMMON := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON,)

View File

@ -136,8 +136,21 @@ ifeq ($(LOCAL_SDK_VERSION),)
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
# No bootclasspath. But we still need "" to prevent javac from using default host bootclasspath.
my_bootclasspath := ""
# Temporary HACK to fix the classpath for bouncycastle / nist-pkix-tests.
# Will be reverted shortly.
ifeq ($(LOCAL_MODULE),bouncycastle)
LOCAL_JAVA_LIBRARIES += core-oj
endif
ifeq ($(LOCAL_MODULE),nist-pkix-tests)
LOCAL_JAVA_LIBRARIES += core-oj
endif
ifeq ($(LOCAL_MODULE),bouncycastle-nojarjar)
LOCAL_JAVA_LIBRARIES += core-oj
endif
else # LOCAL_NO_STANDARD_LIBRARIES
my_bootclasspath := $(call java-lib-files,core-libart)
my_bootclasspath := $(call java-lib-files,core-oj):$(call java-lib-files,core-libart)
endif # LOCAL_NO_STANDARD_LIBRARIES
else
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
@ -161,7 +174,7 @@ ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
my_bootclasspath := ""
else
my_bootclasspath := $(call java-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
my_bootclasspath := $(call java-lib-files,core-oj-hostdex,$(LOCAL_IS_HOST_MODULE)):$(call java-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
endif
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath)
@ -277,7 +290,7 @@ ifeq ($(LOCAL_SDK_VERSION),)
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
my_bootclasspath :=
else
my_bootclasspath := $(call jack-lib-files,core-libart)
my_bootclasspath := $(call jack-lib-files,core-oj):$(call jack-lib-files,core-libart)
endif
else # LOCAL_SDK_VERSION
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
@ -304,7 +317,7 @@ ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
my_bootclasspath :=
else
my_bootclasspath := $(call jack-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
my_bootclasspath := $(call jack-lib-files,core-oj-hostdex,$(LOCAL_IS_HOST_MODULE)):$(call jack-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
endif
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(my_bootclasspath)
full_shared_jack_libs := $(call jack-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))

View File

@ -2,7 +2,11 @@
## Track NOTICE files
###########################################################
ifneq ($(LOCAL_NOTICE_FILE),)
notice_file:=$(strip $(LOCAL_NOTICE_FILE))
else
notice_file:=$(strip $(wildcard $(LOCAL_PATH)/NOTICE))
endif
ifeq ($(LOCAL_MODULE_CLASS),GYP)
# We ignore NOTICE files for modules of type GYP.

View File

@ -58,6 +58,7 @@ PDK_PLATFORM_JAVA_ZIP_JAVA_TARGET_LIB_DIR += \
target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates \
target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates \
target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates \
target/common/obj/JAVA_LIBRARIES/core-oj_intermediates \
target/common/obj/JAVA_LIBRARIES/core-libart_intermediates \
target/common/obj/JAVA_LIBRARIES/core-junit_intermediates \
target/common/obj/JAVA_LIBRARIES/ext_intermediates \

View File

@ -2,7 +2,7 @@
# Each line is interpreted as a regular expression.
###################################################
# core-libart.jar
# core-libart.jar & core-oj.jar
java\.awt\.font
java\.beans
java\.io
@ -13,6 +13,9 @@ java\.lang\.reflect
java\.math
java\.net
java\.nio
java\.nio\.file
java\.nio\.file\.spi
java\.nio\.file\.attribute
java\.nio\.channels
java\.nio\.channels\.spi
java\.nio\.charset
@ -24,6 +27,7 @@ java\.security\.interfaces
java\.security\.spec
java\.sql
java\.text
java\.text\.spi
java\.util
java\.util\.concurrent
java\.util\.concurrent\.atomic
@ -32,6 +36,7 @@ java\.util\.jar
java\.util\.logging
java\.util\.prefs
java\.util\.regex
java\.util\.spi
java\.util\.zip
javax\.crypto
javax\.crypto\.interfaces
@ -54,10 +59,18 @@ javax\.xml\.transform\.sax
javax\.xml\.transform\.stream
javax\.xml\.validation
javax\.xml\.xpath
sun\.misc
org\.w3c\.dom
org\.w3c\.dom\.ls
org\.w3c\.dom\.traversal
# OpenJdk internal implementation.
sun\.misc
sun\.util.*
sun\.text.*
sun\.security.*
sun\.reflect.*
sun\.nio.*
sun\.net.*
com\.sun\..*
# TODO: Move these internal org.apache.harmony classes to libcore.*
org\.apache\.harmony\.crypto\.internal

View File

@ -126,6 +126,7 @@ $(hide) java -Xmx256M \
$(PRIVATE_PARAMS) CollectAllTests $(1) $(2) $(3) "$(4)" $(5) $(6) $(7)
endef
OJ_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-oj,,COMMON)
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)
CONSCRYPT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,conscrypt,,COMMON)
BOUNCYCASTLE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,bouncycastle,,COMMON)
@ -142,7 +143,7 @@ CONSCRYPTTESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,consc
TZDATAUPDATETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,tzdata_update-tests,,COMMON)
GEN_CLASSPATH := \
$(CORE_INTERMEDIATES)/classes.jar:$(CONSCRYPT_INTERMEDIATES)/classes.jar:$(BOUNCYCASTLE_INTERMEDIATES)/classes.jar:$(APACHEXML_INTERMEDIATES)/classes.jar:$(APACHEHARMONYTESTS_INTERMEDIATES)/classes.jar:$(OKHTTP_INTERMEDIATES)/classes.jar:$(OKHTTPTESTS_INTERMEDIATES)/classes.jar:$(OKHTTP_REPACKAGED_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(SQLITEJDBC_INTERMEDIATES)/javalib.jar:$(CORETESTS_INTERMEDIATES)/javalib.jar:$(JSR166TESTS_INTERMEDIATES)/javalib.jar:$(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar:$(TZDATAUPDATETESTS_INTERMEDIATES)/javalib.jar
$(OJ_INTERMEDIATES)/classes.jar:$(CORE_INTERMEDIATES)/classes.jar:$(CONSCRYPT_INTERMEDIATES)/classes.jar:$(BOUNCYCASTLE_INTERMEDIATES)/classes.jar:$(APACHEXML_INTERMEDIATES)/classes.jar:$(APACHEHARMONYTESTS_INTERMEDIATES)/classes.jar:$(OKHTTP_INTERMEDIATES)/classes.jar:$(OKHTTPTESTS_INTERMEDIATES)/classes.jar:$(OKHTTP_REPACKAGED_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(SQLITEJDBC_INTERMEDIATES)/javalib.jar:$(CORETESTS_INTERMEDIATES)/javalib.jar:$(JSR166TESTS_INTERMEDIATES)/javalib.jar:$(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar:$(TZDATAUPDATETESTS_INTERMEDIATES)/javalib.jar
CTS_CORE_XMLS := \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml \
@ -352,10 +353,11 @@ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tzdata.xml: $(CTS_CORE_X
CORE_VM_TEST_TF_DESC := $(CTS_TESTCASES_OUT)/android.core.vm-tests-tf.xml
# core tests only needed to get hold of junit-framework-classes
OJ_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-oj,,COMMON)
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)
JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTSTF_JAR):$(TF_JAR)
GEN_CLASSPATH := $(OJ_INTERMEDIATES)/classes.jar:$(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTSTF_JAR):$(TF_JAR)
$(CORE_VM_TEST_TF_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
# Please see big comment above on why this line depends on javalib.jar instead of classes.jar

View File

@ -83,6 +83,7 @@ PRODUCT_COPY_FILES += \
# The order of PRODUCT_BOOT_JARS matters.
PRODUCT_BOOT_JARS := \
core-oj \
core-libart \
conscrypt \
okhttp \

View File

@ -80,6 +80,7 @@ PRODUCT_PACKAGES += \
# The order matters
PRODUCT_BOOT_JARS := \
core-oj \
core-libart \
conscrypt \
okhttp \

View File

@ -22,6 +22,7 @@ PRODUCT_PACKAGES += \
bouncycastle \
cacerts \
conscrypt \
core-oj \
core-junit \
core-libart \
dalvikvm \
@ -39,6 +40,8 @@ PRODUCT_PACKAGES += \
libicui18n \
libicuuc \
libjavacore \
libopenjdk \
libopenjdkjvm \
libnativehelper \
libssl \
libz \