Skip to content

Commit

Permalink
Include core_lambda_stubs in core_oj.
Browse files Browse the repository at this point in the history
core-oj already contains most of java.lang.invoke - there isn't
much point in complicating build rules for bundled targets by continuing
to rely on stubs. The stubs target continues to exist for compiling code
that contains Java 8 language features against the M sdk.

bug: 31675876
Test: make checkbuild
Change-Id: I9a5ed695fd2406919a218a7dc1c4a7560cc39b91
  • Loading branch information
narayank committed Sep 22, 2016
1 parent 3a72ee2 commit d097a9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions JavaLibrary.mk
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(test_src_files)
LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj core-libart core-lambda-stubs okhttp core-junit junit4-target bouncycastle mockito-target
LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp core-junit junit4-target bouncycastle mockito-target
LOCAL_STATIC_JAVA_LIBRARIES := core-tests-support sqlite-jdbc mockwebserver nist-pkix-tests
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_JAVA_LANGUAGE_VERSION := 1.8
Expand Down Expand Up @@ -217,7 +217,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-test-java-files-under, jsr166-tests)
LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj core-libart core-lambda-stubs core-junit junit4-target
LOCAL_JAVA_LIBRARIES := core-oj core-libart core-junit junit4-target
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_MODULE := jsr166-tests
LOCAL_JAVA_LANGUAGE_VERSION := 1.8
Expand All @@ -229,7 +229,7 @@ endif
ifeq ($(LIBCORE_SKIP_TESTS),)
include $(CLEAR_VARS)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj core-libart core-lambda-stubs okhttp bouncycastle
LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp bouncycastle
LOCAL_STATIC_JAVA_LIBRARIES := testng
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_MODULE_TAGS := optional
Expand All @@ -249,7 +249,7 @@ ifeq ($(LIBCORE_SKIP_TESTS),)
# Include source code as part of JAR
LOCAL_JAVA_RESOURCE_DIRS := ojluni/src/test/dist
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj core-libart core-lambda-stubs okhttp bouncycastle testng
LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp bouncycastle testng
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_MODULE_TAGS := optional
LOCAL_JAVA_LANGUAGE_VERSION := 1.8
Expand Down Expand Up @@ -335,7 +335,7 @@ ifeq ($(LIBCORE_SKIP_TESTS),)
LOCAL_SRC_FILES := $(test_src_files)
LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex core-lambda-stubs-hostdex okhttp-hostdex bouncycastle-hostdex core-junit-hostdex junit4-target-hostdex core-tests-support-hostdex mockito-api-hostdex
LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex okhttp-hostdex bouncycastle-hostdex core-junit-hostdex junit4-target-hostdex core-tests-support-hostdex mockito-api-hostdex
LOCAL_STATIC_JAVA_LIBRARIES := sqlite-jdbc-host mockwebserver-host nist-pkix-tests-host
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_MODULE_TAGS := optional
Expand Down Expand Up @@ -365,7 +365,7 @@ ifeq ($(LIBCORE_SKIP_TESTS),)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(ojtest_src_files)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex core-lambda-stubs-hostdex okhttp-hostdex bouncycastle-hostdex
LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex okhttp-hostdex bouncycastle-hostdex
LOCAL_STATIC_JAVA_LIBRARIES := testng-hostdex
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_MODULE_TAGS := optional
Expand Down
14 changes: 8 additions & 6 deletions openjdk_java_files.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1615,16 +1615,18 @@ openjdk_java_files := \
ojluni/src/main/java/sun/util/logging/PlatformLogger.java \
ojluni/src/main/java/sun/util/ResourceBundleEnumeration.java \
ojluni/src/main/java/sun/util/resources/OpenListResourceBundle.java \
$(openjdk_javadoc_files)
$(openjdk_javadoc_files) \
$(openjdk_lambda_stub_files)

# Stubs needed to satisfy javac's dependencies when compiling lambda code. These are
# not used on Android devices or required by the Jack compiler.
#
# The stub files in openjdk_lambda_duplicate_stub_files are present in core-oj as
# well, and need to be included here to support compiling against older SDKs and the
# like. This additional bit of ugliness if required to avoid a circular dependency
# between core-all and these stubs. Eventually, all of these stubs will become
# "duplicates" and then that list can be renamed to "openjdk_lambda_stub_files".
# On aosp/master:
# openjdk_lambda_stub_files : These are included in core-oj as stubs
# openjdk_lambda_duplicate_stub_files : These contain complete implementations in core-oj.
#
# On older platforms : Both sets of stub files are used and core-oj does not contain
# any of these classes.
openjdk_lambda_stub_files := \
ojluni/src/lambda/java/java/lang/invoke/CallSite.java \
ojluni/src/lambda/java/java/lang/invoke/LambdaMetafactory.java \
Expand Down

0 comments on commit d097a9b

Please sign in to comment.