Merge "Increase errorprone heap size" am: ea74a4779f am: 16836c4613

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2003070

Change-Id: I4b74a71aa1124aac06a15a6cc30474dcf6f3a84f
This commit is contained in:
Colin Cross 2022-02-28 23:50:11 +00:00 committed by Automerger Merge Worker
commit 025c13b6cc
2 changed files with 7 additions and 1 deletions

View file

@ -862,7 +862,7 @@ func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaB
}
errorProneFlags = append(errorProneFlags, j.properties.Errorprone.Javacflags...)
flags.errorProneExtraJavacFlags = "${config.ErrorProneFlags} " +
flags.errorProneExtraJavacFlags = "${config.ErrorProneHeapFlags} ${config.ErrorProneFlags} " +
"'" + strings.Join(errorProneFlags, " ") + "'"
flags.errorProneProcessorPath = classpath(android.PathsForSource(ctx, config.ErrorProneClasspath))
}

View file

@ -68,6 +68,12 @@ func init() {
pctx.StaticVariable("JavacHeapSize", "2048M")
pctx.StaticVariable("JavacHeapFlags", "-J-Xmx${JavacHeapSize}")
// ErrorProne can use significantly more memory than javac alone, give it a higher heap
// size (b/221480398).
pctx.StaticVariable("ErrorProneHeapSize", "4096M")
pctx.StaticVariable("ErrorProneHeapFlags", "-J-Xmx${ErrorProneHeapSize}")
pctx.StaticVariable("DexFlags", "-JXX:OnError='cat hs_err_pid%p.log' -JXX:CICompilerCount=6 -JXX:+UseDynamicNumberOfGCThreads")
pctx.StaticVariable("CommonJdkFlags", strings.Join([]string{