Add support for ALTERNATE_JAVAC
Bug: 12476356 Change-Id: Idd013031dc32a560bca76cca295bedcad55982b4
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
# Inputs:
|
# Inputs:
|
||||||
# CUSTOM_JAVA_COMPILER -- "eclipse", "openjdk". or nothing for the system
|
# CUSTOM_JAVA_COMPILER -- "eclipse", "openjdk". or nothing for the system
|
||||||
# default
|
# default
|
||||||
|
# ALTERNATE_JAVAC -- the alternate java compiler to use
|
||||||
#
|
#
|
||||||
# Outputs:
|
# Outputs:
|
||||||
# COMMON_JAVAC -- Java compiler command with common arguments
|
# COMMON_JAVAC -- Java compiler command with common arguments
|
||||||
@@ -14,13 +15,19 @@ else
|
|||||||
common_flags := -source 1.7 -target 1.7 -Xmaxerrs 9999999
|
common_flags := -source 1.7 -target 1.7 -Xmaxerrs 9999999
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Use the indexer wrapper to index the codebase instead of the javac compiler
|
||||||
|
ifeq ($(ALTERNATE_JAVAC),)
|
||||||
|
JAVACC := javac
|
||||||
|
else
|
||||||
|
JAVACC := $(ALTERNATE_JAVAC)
|
||||||
|
endif
|
||||||
|
|
||||||
# Whatever compiler is on this system.
|
# Whatever compiler is on this system.
|
||||||
ifeq ($(BUILD_OS), windows)
|
ifeq ($(BUILD_OS), windows)
|
||||||
COMMON_JAVAC := development/host/windows/prebuilt/javawrap.exe -J-Xmx256m \
|
COMMON_JAVAC := development/host/windows/prebuilt/javawrap.exe -J-Xmx256m \
|
||||||
$(common_flags)
|
$(common_flags)
|
||||||
else
|
else
|
||||||
COMMON_JAVAC := javac -J-Xmx512M $(common_flags)
|
COMMON_JAVAC := $(JAVACC) -J-Xmx512M $(common_flags)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Eclipse.
|
# Eclipse.
|
||||||
@@ -32,6 +39,6 @@ endif
|
|||||||
|
|
||||||
HOST_JAVAC ?= $(COMMON_JAVAC)
|
HOST_JAVAC ?= $(COMMON_JAVAC)
|
||||||
TARGET_JAVAC ?= $(COMMON_JAVAC)
|
TARGET_JAVAC ?= $(COMMON_JAVAC)
|
||||||
|
|
||||||
#$(info HOST_JAVAC=$(HOST_JAVAC))
|
#$(info HOST_JAVAC=$(HOST_JAVAC))
|
||||||
#$(info TARGET_JAVAC=$(TARGET_JAVAC))
|
#$(info TARGET_JAVAC=$(TARGET_JAVAC))
|
||||||
|
Reference in New Issue
Block a user