From 2aad9c2882a1e2902597c66ac7ad29918b8ad0eb Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 14 Aug 2017 14:17:37 -0700 Subject: [PATCH] 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 2478d8b88527f52c73572e6d868861cd57341271) --- java/config/makevars.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/java/config/makevars.go b/java/config/makevars.go index ac0278280..29ef57d44 100644 --- a/java/config/makevars.go +++ b/java/config/makevars.go @@ -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}") + } }