Limit the number of the Java source files in a single compilation unit
KYTHE_JAVA_SOURCE_BATCH_SIZE environment variable controls this setting. The limit is 1000 if this variable is not set. Fixes: 179932118 Test: run prebuilts/build-tools/build-prebuilts.sh, use it to build kzips, check Change-Id: I9ad57dfd1d2c2dce5cff755b1bd61cf933420bd3
This commit is contained in:
@@ -80,6 +80,8 @@ var (
|
||||
func(ctx android.PackageVarContext) string { return ctx.Config().XrefCorpusName() })
|
||||
_ = pctx.VariableFunc("kytheCuEncoding",
|
||||
func(ctx android.PackageVarContext) string { return ctx.Config().XrefCuEncoding() })
|
||||
_ = pctx.VariableFunc("kytheCuJavaSourceMax",
|
||||
func(ctx android.PackageVarContext) string { return ctx.Config().XrefCuJavaSourceMax() })
|
||||
_ = pctx.SourcePathVariable("kytheVnames", "build/soong/vnames.json")
|
||||
// Run it with -add-opens=java.base/java.nio=ALL-UNNAMED to avoid JDK9's warning about
|
||||
// "Illegal reflective access by com.google.protobuf.Utf8$UnsafeProcessor ...
|
||||
@@ -93,6 +95,7 @@ var (
|
||||
`KYTHE_CORPUS=${kytheCorpus} ` +
|
||||
`KYTHE_VNAMES=${kytheVnames} ` +
|
||||
`KYTHE_KZIP_ENCODING=${kytheCuEncoding} ` +
|
||||
`KYTHE_JAVA_SOURCE_BATCH_SIZE=${kytheCuJavaSourceMax} ` +
|
||||
`${config.SoongJavacWrapper} ${config.JavaCmd} ` +
|
||||
`--add-opens=java.base/java.nio=ALL-UNNAMED ` +
|
||||
`-jar ${config.JavaKytheExtractorJar} ` +
|
||||
|
Reference in New Issue
Block a user