Fix checkbuild files on last variant
The context checkbuild files were not copied to the module checkbuild files before calling generateModuleTarget, which would cause them to not be considered, and in the case of a module with a single variant, cause a build failure when the checkbuild target was skipped. Change-Id: I77faafdc1a8a866e3c2c1157f987015b553acf01
This commit is contained in:
@@ -254,12 +254,9 @@ func (a *AndroidModuleBase) generateModuleTarget(ctx blueprint.ModuleContext) {
|
||||
allInstalledFiles := []string{}
|
||||
allCheckbuildFiles := []string{}
|
||||
ctx.VisitAllModuleVariants(func(module blueprint.Module) {
|
||||
if androidModule, ok := module.(AndroidModule); ok {
|
||||
files := androidModule.base().installFiles
|
||||
allInstalledFiles = append(allInstalledFiles, files...)
|
||||
files = androidModule.base().checkbuildFiles
|
||||
allCheckbuildFiles = append(allCheckbuildFiles, files...)
|
||||
}
|
||||
a := module.(AndroidModule).base()
|
||||
allInstalledFiles = append(allInstalledFiles, a.installFiles...)
|
||||
allCheckbuildFiles = append(allCheckbuildFiles, a.checkbuildFiles...)
|
||||
})
|
||||
|
||||
deps := []string{}
|
||||
@@ -329,13 +326,13 @@ func (a *AndroidModuleBase) GenerateBuildActions(ctx blueprint.ModuleContext) {
|
||||
return
|
||||
}
|
||||
|
||||
a.installFiles = append(a.installFiles, androidCtx.installFiles...)
|
||||
a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
|
||||
|
||||
a.generateModuleTarget(ctx)
|
||||
if ctx.Failed() {
|
||||
return
|
||||
}
|
||||
|
||||
a.installFiles = append(a.installFiles, androidCtx.installFiles...)
|
||||
a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
|
||||
}
|
||||
|
||||
type androidBaseContextImpl struct {
|
||||
|
Reference in New Issue
Block a user