Use java variables from soong
Use TARGET_JAVAC and HOST_JAVAC exported from soong. Test: m -j checkbuild Change-Id: Ic094174149ea304c0b06ddc023417acf3602d5a3
This commit is contained in:
parent
6ece63fde3
commit
204dd14a2c
1 changed files with 5 additions and 32 deletions
|
@ -1,12 +1,11 @@
|
|||
# Selects a Java compiler.
|
||||
#
|
||||
# Inputs:
|
||||
# CUSTOM_JAVA_COMPILER -- "eclipse", "openjdk". or nothing for the system
|
||||
# default
|
||||
# ALTERNATE_JAVAC -- the alternate java compiler to use
|
||||
# OVERRIDE_ANDROID_JAVA_HOME -- alternate location to use for jdk
|
||||
#
|
||||
# Outputs:
|
||||
# COMMON_JAVAC -- Java compiler command with common arguments
|
||||
# ANDROID_JAVA_HOME -- Directory that contains JDK
|
||||
# ANDROID_JAVA_TOOLCHAIN -- Directory that contains javac and other java tools
|
||||
#
|
||||
|
||||
ifndef ANDROID_COMPILE_WITH_JACK
|
||||
|
@ -23,8 +22,6 @@ ifndef ANDROID_COMPILE_WITH_JACK
|
|||
endif
|
||||
endif
|
||||
|
||||
common_jdk_flags := -Xmaxerrs 9999999
|
||||
|
||||
ifeq ($(OVERRIDE_ANDROID_JAVA_HOME),)
|
||||
ANDROID_JAVA_HOME := prebuilts/jdk/jdk8/$(HOST_PREBUILT_TAG)
|
||||
else
|
||||
|
@ -34,30 +31,6 @@ endif
|
|||
ANDROID_JAVA_TOOLCHAIN := $(ANDROID_JAVA_HOME)/bin
|
||||
export JAVA_HOME := $(abspath $(ANDROID_JAVA_HOME))
|
||||
|
||||
# Use the indexer wrapper to index the codebase instead of the javac compiler
|
||||
ifeq ($(ALTERNATE_JAVAC),)
|
||||
JAVACC := $(ANDROID_JAVA_TOOLCHAIN)/javac
|
||||
else
|
||||
JAVACC := $(ALTERNATE_JAVAC)
|
||||
endif
|
||||
|
||||
# TODO(ccross): remove this, it is needed for now because it is used by
|
||||
# config.mk before makevars from soong are loaded
|
||||
JAVA := $(ANDROID_JAVA_TOOLCHAIN)/java
|
||||
JAVADOC := $(ANDROID_JAVA_TOOLCHAIN)/javadoc
|
||||
JAR := $(ANDROID_JAVA_TOOLCHAIN)/jar
|
||||
|
||||
# The actual compiler can be wrapped by setting the JAVAC_WRAPPER var.
|
||||
ifdef JAVAC_WRAPPER
|
||||
ifneq ($(JAVAC_WRAPPER),$(firstword $(JAVACC)))
|
||||
JAVACC := $(JAVAC_WRAPPER) $(JAVACC)
|
||||
endif
|
||||
endif
|
||||
|
||||
COMMON_JAVAC := $(JAVACC) -J-Xmx2048M $(common_jdk_flags)
|
||||
|
||||
GLOBAL_JAVAC_DEBUG_FLAGS := -g
|
||||
|
||||
HOST_JAVAC ?= $(COMMON_JAVAC)
|
||||
TARGET_JAVAC ?= $(COMMON_JAVAC)
|
||||
|
||||
#$(info HOST_JAVAC=$(HOST_JAVAC))
|
||||
#$(info TARGET_JAVAC=$(TARGET_JAVAC))
|
||||
|
|
Loading…
Reference in a new issue