diff options
author | 2021-02-16 10:39:40 -0800 | |
---|---|---|
committer | 2021-02-16 15:14:52 -0800 | |
commit | b0addafd93409e7a9a04a126cd76a543364b2252 (patch) | |
tree | 5bcd498c1c258fbb0d4349053058f8add58158f7 /java/builder.go | |
parent | 36eb24b3ab47fb0822739bb0c811de569b774750 (diff) |
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
Diffstat (limited to 'java/builder.go')
-rw-r--r-- | java/builder.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/java/builder.go b/java/builder.go index 22a891ae1..33206ceeb 100644 --- a/java/builder.go +++ b/java/builder.go @@ -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} ` + |