Depend on all the files from system modules

Instead of just one of the files that we pass into javac.

Test: treehugger
Change-Id: I8478e88656487c9f667893d7c17839f0ea63c78f
This commit is contained in:
Dan Willemsen
2019-06-13 16:52:01 +00:00
parent eec8d3aee3
commit ff60a73d89
5 changed files with 40 additions and 27 deletions

View File

@@ -148,15 +148,16 @@ func init() {
}
type javaBuilderFlags struct {
javacFlags string
bootClasspath classpath
classpath classpath
processorPath classpath
processor string
systemModules classpath
aidlFlags string
aidlDeps android.Paths
javaVersion string
javacFlags string
bootClasspath classpath
classpath classpath
processorPath classpath
processor string
systemModules classpath
systemModulesDeps android.Paths
aidlFlags string
aidlDeps android.Paths
javaVersion string
errorProneExtraJavacFlags string
errorProneProcessorPath classpath
@@ -248,7 +249,7 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
var bootClasspath string
if flags.javaVersion == "1.9" {
deps = append(deps, flags.systemModules...)
deps = append(deps, flags.systemModulesDeps...)
bootClasspath = flags.systemModules.FormJavaSystemModulesPath("--system=", ctx.Device())
} else {
deps = append(deps, flags.bootClasspath...)
@@ -430,7 +431,7 @@ func (x *classpath) FormJavaSystemModulesPath(optName string, forceEmpty bool) s
if len(*x) > 1 {
panic("more than one system module")
} else if len(*x) == 1 {
return optName + strings.TrimSuffix((*x)[0].String(), "lib/modules")
return optName + (*x)[0].String()
} else if forceEmpty {
return optName + "none"
} else {