Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0ef70ff authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Use java variables from soong" am: ae470d41 am: 65990cdf

am: 7ac000ab

Change-Id: I9e89188255fdad31806426eeb3072a9178163bce
parents 694cd435 7ac000ab
Loading
Loading
Loading
Loading
+5 −32
Original line number Diff line number Diff line
# 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))