Merge "Export TARGET_JAVAC and HOST_JAVAC to make"
diff --git a/java/config/makevars.go b/java/config/makevars.go
index ac02782..29ef57d 100644
--- a/java/config/makevars.go
+++ b/java/config/makevars.go
@@ -37,4 +37,12 @@
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}")
+ }
}