am 4dfda1fa: Merge "Remove Java 6 build support"

* commit '4dfda1fa4201e41022396b77054168ffc73b590c':
  Remove Java 6 build support
This commit is contained in:
Neil Fuller 2014-10-24 20:18:15 +00:00 committed by Android Git Automerger
commit f7ce9508de
4 changed files with 10 additions and 46 deletions

View File

@ -9,11 +9,7 @@
# COMMON_JAVAC -- Java compiler command with common arguments # COMMON_JAVAC -- Java compiler command with common arguments
# #
ifneq ($(LEGACY_USE_JAVA6),)
common_jdk_flags := -target 1.5 -Xmaxerrs 9999999
else
common_jdk_flags := -source 1.7 -target 1.7 -Xmaxerrs 9999999 common_jdk_flags := -source 1.7 -target 1.7 -Xmaxerrs 9999999
endif
# Use the indexer wrapper to index the codebase instead of the javac compiler # Use the indexer wrapper to index the codebase instead of the javac compiler
ifeq ($(ALTERNATE_JAVAC),) ifeq ($(ALTERNATE_JAVAC),)

View File

@ -437,17 +437,7 @@ else
COLUMN:= column COLUMN:= column
endif endif
ifeq ($(HOST_OS),darwin)
ifeq ($(LEGACY_USE_JAVA6),)
HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh) HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
else
# Deliberately set to blank for Java 6 installations on MacOS. These
# versions allegedly use a non-standard directory structure.
HOST_JDK_TOOLS_JAR :=
endif
else
HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
endif
ifneq ($(HOST_JDK_TOOLS_JAR),) ifneq ($(HOST_JDK_TOOLS_JAR),)
ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),) ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)

View File

@ -139,19 +139,11 @@ endif
java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1) java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1)
javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1) javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1)
# Check for the correct version of java, should be 1.7 by # Check for the correct version of java.
# default, and 1.6 if LEGACY_USE_JAVA6 is set.
ifeq ($(LEGACY_USE_JAVA6),)
required_version := "1.7.x" required_version := "1.7.x"
required_javac_version := "1.7" required_javac_version := "1.7"
java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.7[\. "$$]') java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.7[\. "$$]')
javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.7[\. "$$]') javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.7[\. "$$]')
else # if LEGACY_USE_JAVA6
required_version := "1.6.x"
required_javac_version := "1.6"
java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.6[\. "$$]')
javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.6[\. "$$]')
endif # if LEGACY_USE_JAVA6
ifeq ($(strip $(java_version)),) ifeq ($(strip $(java_version)),)
$(info ************************************************************) $(info ************************************************************)
@ -170,13 +162,10 @@ endif
# Check for the current JDK. # Check for the current JDK.
# #
# For Java 1.7, we require OpenJDK on linux and Oracle JDK on Mac OS. # For Java 1.7, we require OpenJDK on linux and Oracle JDK on Mac OS.
# For Java 1.6, we require Oracle for all host OSes.
requires_openjdk := false requires_openjdk := false
ifeq ($(LEGACY_USE_JAVA6),)
ifeq ($(HOST_OS), linux) ifeq ($(HOST_OS), linux)
requires_openjdk := true requires_openjdk := true
endif endif
endif
# Check for the current jdk # Check for the current jdk

View File

@ -1402,7 +1402,7 @@ function godir () {
\cd $T/$pathname \cd $T/$pathname
} }
# Force JAVA_HOME to point to java 1.7 or java 1.6 if it isn't already set. # Force JAVA_HOME to point to java 1.7 if it isn't already set.
# #
# Note that the MacOS path for java 1.7 includes a minor revision number (sigh). # Note that the MacOS path for java 1.7 includes a minor revision number (sigh).
# For some reason, installing the JDK doesn't make it show up in the # For some reason, installing the JDK doesn't make it show up in the
@ -1419,16 +1419,6 @@ function set_java_home() {
fi fi
if [ ! "$JAVA_HOME" ]; then if [ ! "$JAVA_HOME" ]; then
if [ -n "$LEGACY_USE_JAVA6" ]; then
case `uname -s` in
Darwin)
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
;;
*)
export JAVA_HOME=/usr/lib/jvm/java-6-sun
;;
esac
else
case `uname -s` in case `uname -s` in
Darwin) Darwin)
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7) export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
@ -1437,7 +1427,6 @@ function set_java_home() {
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
;; ;;
esac esac
fi
# Keep track of the fact that we set JAVA_HOME ourselves, so that # Keep track of the fact that we set JAVA_HOME ourselves, so that
# we can change it on the next envsetup.sh, if required. # we can change it on the next envsetup.sh, if required.