Export TARGET_JAVAC and HOST_JAVAC to make

Export TARGET_JAVAC and HOST_JAVAC to make.  This moves control
of the javac command line flags into soong.

Test: m -j checkbuild
Merged-In: Ifa3e35be0abd2778741680216427403ba58a0a3b
Change-Id: Ifa3e35be0abd2778741680216427403ba58a0a3b
(cherry picked from commit 2478d8b885)
This commit is contained in:
Colin Cross 2017-08-14 14:17:37 -07:00
parent feda20b947
commit 2aad9c2882
1 changed files with 8 additions and 0 deletions

View File

@ -37,4 +37,12 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
ctx.Strict("JAR_ARGS", "${JarArgsCmd}")
ctx.Strict("JAVADOC", "${JavadocCmd}")
ctx.Strict("COMMON_JDK_FLAGS", "${CommonJdkFlags}")
if ctx.Config().IsEnvTrue("RUN_ERROR_PRONE") {
ctx.Strict("TARGET_JAVAC", "${ErrorProneCmd}")
ctx.Strict("HOST_JAVAC", "${ErrorProneCmd}")
} else {
ctx.Strict("TARGET_JAVAC", "${JavacCmd} ${CommonJdkFlags}")
ctx.Strict("HOST_JAVAC", "${JavacCmd} ${CommonJdkFlags}")
}
}