Do not pass -system arg to Metalava.
Continue to use -bootclasspath when -source 1.9 is enabled for Metalava since it doesn't support -system yet. Test: N/A Bug: b/110824610 Change-Id: Ie1c047963bd66f1a100255efdcd6ca378cf2e1c4
This commit is contained in:
parent
95894d8ffe
commit
c94f9d886c
|
@ -646,20 +646,11 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
if !Bool(d.properties.Metalava_enabled) {
|
if !Bool(d.properties.Metalava_enabled) {
|
||||||
javaVersion = "1.8"
|
javaVersion = "1.8"
|
||||||
}
|
}
|
||||||
if javaVersion == "1.9" {
|
// continue to use -bootclasspath even if Metalava under -source 1.9 is enabled
|
||||||
if len(deps.bootClasspath) > 0 {
|
// since it doesn't support system modules yet.
|
||||||
var systemModules classpath
|
if len(deps.bootClasspath.Strings()) > 0 {
|
||||||
if deps.systemModules != nil {
|
// For OpenJDK 8 we can use -bootclasspath to define the core libraries code.
|
||||||
systemModules = append(systemModules, deps.systemModules)
|
bootClasspathArgs = deps.bootClasspath.FormJavaClassPath("-bootclasspath")
|
||||||
}
|
|
||||||
bootClasspathArgs = systemModules.FormJavaSystemModulesPath("--system ", ctx.Device())
|
|
||||||
bootClasspathArgs = bootClasspathArgs + " --patch-module java.base=."
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if len(deps.bootClasspath.Strings()) > 0 {
|
|
||||||
// For OpenJDK 8 we can use -bootclasspath to define the core libraries code.
|
|
||||||
bootClasspathArgs = deps.bootClasspath.FormJavaClassPath("-bootclasspath")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
classpathArgs := deps.classpath.FormJavaClassPath("-classpath")
|
classpathArgs := deps.classpath.FormJavaClassPath("-classpath")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue