Merge "Increase errorprone heap size"

This commit is contained in:
Colin Cross 2022-02-28 23:02:12 +00:00 committed by Gerrit Code Review
commit ea74a4779f
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...) errorProneFlags = append(errorProneFlags, j.properties.Errorprone.Javacflags...)
flags.errorProneExtraJavacFlags = "${config.ErrorProneFlags} " + flags.errorProneExtraJavacFlags = "${config.ErrorProneHeapFlags} ${config.ErrorProneFlags} " +
"'" + strings.Join(errorProneFlags, " ") + "'" "'" + strings.Join(errorProneFlags, " ") + "'"
flags.errorProneProcessorPath = classpath(android.PathsForSource(ctx, config.ErrorProneClasspath)) flags.errorProneProcessorPath = classpath(android.PathsForSource(ctx, config.ErrorProneClasspath))
} }

View file

@ -68,6 +68,12 @@ func init() {
pctx.StaticVariable("JavacHeapSize", "2048M") pctx.StaticVariable("JavacHeapSize", "2048M")
pctx.StaticVariable("JavacHeapFlags", "-J-Xmx${JavacHeapSize}") 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("DexFlags", "-JXX:OnError='cat hs_err_pid%p.log' -JXX:CICompilerCount=6 -JXX:+UseDynamicNumberOfGCThreads")
pctx.StaticVariable("CommonJdkFlags", strings.Join([]string{ pctx.StaticVariable("CommonJdkFlags", strings.Join([]string{