Merge changes from topic "soong_ui_java"
am: a3d94873cf
Change-Id: Ic105acbad02e4eda504b6fedcb2a6eac6788ba8e
This commit is contained in:
commit
f68edeafdc
|
@ -1,10 +1,6 @@
|
||||||
# Selects a Java compiler.
|
# Selects a Java compiler.
|
||||||
#
|
#
|
||||||
# Inputs:
|
|
||||||
# OVERRIDE_ANDROID_JAVA_HOME -- alternate location to use for jdk
|
|
||||||
#
|
|
||||||
# Outputs:
|
# Outputs:
|
||||||
# ANDROID_JAVA_HOME -- Directory that contains JDK
|
|
||||||
# ANDROID_JAVA_TOOLCHAIN -- Directory that contains javac and other java tools
|
# ANDROID_JAVA_TOOLCHAIN -- Directory that contains javac and other java tools
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -16,19 +12,7 @@ ifdef TARGET_BUILD_APPS
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(OVERRIDE_ANDROID_JAVA_HOME),)
|
|
||||||
# Use this build toolchain instead of the bundled one.
|
|
||||||
ANDROID_JAVA_HOME := $(OVERRIDE_ANDROID_JAVA_HOME)
|
|
||||||
else # !OVERRIDE_ANDROID_JAVA_HOME
|
|
||||||
ifneq ($(EXPERIMENTAL_USE_OPENJDK9),)
|
|
||||||
ANDROID_JAVA_HOME := prebuilts/jdk/jdk9/$(HOST_PREBUILT_TAG)
|
|
||||||
else
|
|
||||||
ANDROID_JAVA_HOME := prebuilts/jdk/jdk8/$(HOST_PREBUILT_TAG)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ANDROID_JAVA_TOOLCHAIN := $(ANDROID_JAVA_HOME)/bin
|
ANDROID_JAVA_TOOLCHAIN := $(ANDROID_JAVA_HOME)/bin
|
||||||
export JAVA_HOME := $(abspath $(ANDROID_JAVA_HOME))
|
|
||||||
|
|
||||||
# TODO(ccross): remove this, it is needed for now because it is used by
|
# TODO(ccross): remove this, it is needed for now because it is used by
|
||||||
# config.mk before makevars from soong are loaded
|
# config.mk before makevars from soong are loaded
|
||||||
|
|
|
@ -58,6 +58,9 @@ backslash := $(patsubst %a,%,$(backslash))
|
||||||
# If a rule fails, delete $@.
|
# If a rule fails, delete $@.
|
||||||
.DELETE_ON_ERROR:
|
.DELETE_ON_ERROR:
|
||||||
|
|
||||||
|
# Mark variables deprecated/obsolete
|
||||||
|
$(KATI_deprecated_var PATH,Do not use PATH directly)
|
||||||
|
|
||||||
# Used to force goals to build. Only use for conditionally defined goals.
|
# Used to force goals to build. Only use for conditionally defined goals.
|
||||||
.PHONY: FORCE
|
.PHONY: FORCE
|
||||||
FORCE:
|
FORCE:
|
||||||
|
@ -860,25 +863,6 @@ else
|
||||||
APPS_DEFAULT_VERSION_NAME := $(PLATFORM_VERSION)
|
APPS_DEFAULT_VERSION_NAME := $(PLATFORM_VERSION)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(JAVA_NOT_REQUIRED),true)
|
|
||||||
# Remove java and tools from our path so that we make sure nobody uses them.
|
|
||||||
unexport ANDROID_JAVA_HOME
|
|
||||||
unexport JAVA_HOME
|
|
||||||
export ANDROID_BUILD_PATHS:=$(abspath $(BUILD_SYSTEM)/no_java_path):$(ANDROID_BUILD_PATHS)
|
|
||||||
export PATH:=$(abspath $(BUILD_SYSTEM)/no_java_path):$(PATH)
|
|
||||||
else
|
|
||||||
# Put java first on the path
|
|
||||||
# TODO(ccross): remove this once tools run during the build no longer depend on
|
|
||||||
# finding java in the path
|
|
||||||
ifeq (,$(strip $(CALLED_FROM_SETUP)))
|
|
||||||
ifneq ($(shell which java),$(abspath $(ANDROID_JAVA_TOOLCHAIN)/java))
|
|
||||||
$(warning Found incorrect java $(shell which java) in $$PATH)
|
|
||||||
$(warning Adding $(abspath $(ANDROID_JAVA_TOOLCHAIN)) to $$PATH)
|
|
||||||
export PATH:=$(abspath $(ANDROID_JAVA_TOOLCHAIN)):$(PATH)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Projects clean of compiler warnings should be compiled with -Werror.
|
# Projects clean of compiler warnings should be compiled with -Werror.
|
||||||
# If most modules in a directory such as external/ have warnings,
|
# If most modules in a directory such as external/ have warnings,
|
||||||
# the directory should be in ANDROID_WARNING_ALLOWED_PROJECTS list.
|
# the directory should be in ANDROID_WARNING_ALLOWED_PROJECTS list.
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
java
|
|
|
@ -1 +0,0 @@
|
||||||
java
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Error: JAVA_NOT_REQUIRED=true, $(basename $0) is unavailable." 1>&2
|
|
||||||
exit 1
|
|
|
@ -1 +0,0 @@
|
||||||
java
|
|
|
@ -1 +0,0 @@
|
||||||
java
|
|
Loading…
Reference in New Issue