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

@@ -628,6 +628,7 @@ type deps struct {
srcs android.Paths
srcJars android.Paths
systemModules android.Path
systemModulesDeps android.Paths
aidlPreprocess android.OptionalPath
kotlinStdlib android.Paths
kotlinAnnotations android.Paths
@@ -835,10 +836,11 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
panic("Found two system module dependencies")
}
sm := module.(*SystemModules)
if sm.outputFile == nil {
if sm.outputDir == nil || len(sm.outputDeps) == 0 {
panic("Missing directory for system module dependency")
}
deps.systemModules = sm.outputFile
deps.systemModules = sm.outputDir
deps.systemModulesDeps = sm.outputDeps
}
}
})
@@ -968,6 +970,7 @@ func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaB
// systemModules
if deps.systemModules != nil {
flags.systemModules = append(flags.systemModules, deps.systemModules)
flags.systemModulesDeps = append(flags.systemModulesDeps, deps.systemModulesDeps...)
}
// aidl flags.