Add --add-exports= options to the java extractor invocation.
Long live Java modules system. Fixes: 254752344 Test: run build_kzip.bash Change-Id: I9c807afd22d7b2abc2af1f6ac7a0c1e4c8a8b3e1
This commit is contained in:
@@ -83,9 +83,9 @@ var (
|
|||||||
_ = pctx.VariableFunc("kytheCuJavaSourceMax",
|
_ = pctx.VariableFunc("kytheCuJavaSourceMax",
|
||||||
func(ctx android.PackageVarContext) string { return ctx.Config().XrefCuJavaSourceMax() })
|
func(ctx android.PackageVarContext) string { return ctx.Config().XrefCuJavaSourceMax() })
|
||||||
_ = pctx.SourcePathVariable("kytheVnames", "build/soong/vnames.json")
|
_ = pctx.SourcePathVariable("kytheVnames", "build/soong/vnames.json")
|
||||||
// Run it with -add-opens=java.base/java.nio=ALL-UNNAMED to avoid JDK9's warning about
|
// Run it with several --add-exports to allow the classes in the
|
||||||
// "Illegal reflective access by com.google.protobuf.Utf8$UnsafeProcessor ...
|
// com.google.devtools.kythe.extractors.java.standalone package access the packages in the
|
||||||
// to field java.nio.Buffer.address"
|
// jdk.compiler compiler module. Long live Java modules.
|
||||||
kytheExtract = pctx.AndroidStaticRule("kythe",
|
kytheExtract = pctx.AndroidStaticRule("kythe",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `${config.ZipSyncCmd} -d $srcJarDir ` +
|
Command: `${config.ZipSyncCmd} -d $srcJarDir ` +
|
||||||
@@ -97,7 +97,17 @@ var (
|
|||||||
`KYTHE_KZIP_ENCODING=${kytheCuEncoding} ` +
|
`KYTHE_KZIP_ENCODING=${kytheCuEncoding} ` +
|
||||||
`KYTHE_JAVA_SOURCE_BATCH_SIZE=${kytheCuJavaSourceMax} ` +
|
`KYTHE_JAVA_SOURCE_BATCH_SIZE=${kytheCuJavaSourceMax} ` +
|
||||||
`${config.SoongJavacWrapper} ${config.JavaCmd} ` +
|
`${config.SoongJavacWrapper} ${config.JavaCmd} ` +
|
||||||
|
// Avoid JDK9's warning about "Illegal reflective access by com.google.protobuf.Utf8$UnsafeProcessor ...
|
||||||
|
// to field java.nio.Buffer.address"
|
||||||
`--add-opens=java.base/java.nio=ALL-UNNAMED ` +
|
`--add-opens=java.base/java.nio=ALL-UNNAMED ` +
|
||||||
|
// Allow the classes in the com.google.devtools.kythe.extractors.java.standalone package
|
||||||
|
// access the packages in the jdk.compiler compiler module
|
||||||
|
`--add-opens=java.base/java.nio=ALL-UNNAMED ` +
|
||||||
|
`--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED ` +
|
||||||
|
`--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED ` +
|
||||||
|
`--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED ` +
|
||||||
|
`--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED ` +
|
||||||
|
`--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED ` +
|
||||||
`-jar ${config.JavaKytheExtractorJar} ` +
|
`-jar ${config.JavaKytheExtractorJar} ` +
|
||||||
`${config.JavacHeapFlags} ${config.CommonJdkFlags} ` +
|
`${config.JavacHeapFlags} ${config.CommonJdkFlags} ` +
|
||||||
`$processorpath $processor $javacFlags $bootClasspath $classpath ` +
|
`$processorpath $processor $javacFlags $bootClasspath $classpath ` +
|
||||||
|
Reference in New Issue
Block a user