aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2016-09-19 15:18:11 -0700
committerColin Cross <ccross@android.com>2016-09-19 16:50:35 -0700
commit9b1d13db73bc5ea0c6df385202b3f47867ecbf31 (patch)
tree2adbfbdefa8fcbeb021f573a6581be1e4d39fbfa /android
parentb0f28957aec5e661796a43bab7d7b6d732833654 (diff)
downloadbuild_soong-9b1d13db73bc5ea0c6df385202b3f47867ecbf31.tar.gz
build_soong-9b1d13db73bc5ea0c6df385202b3f47867ecbf31.tar.bz2
build_soong-9b1d13db73bc5ea0c6df385202b3f47867ecbf31.zip
Fix checkbuild for modules with last variant disabled
The soong checkbuild target is created by the last varaint of each module. Don't return early if the variant is disabled, which would prevent creating the checkbuild target. Test: m -j checkbuild Change-Id: Ib260bae7fb4be7255f5c1b34dfbd50225f308005
Diffstat (limited to 'android')
-rw-r--r--android/module.go28
1 files changed, 12 insertions, 16 deletions
diff --git a/android/module.go b/android/module.go
index e415c0a5..95bd9ea0 100644
--- a/android/module.go
+++ b/android/module.go
@@ -366,10 +366,6 @@ func (p *ModuleBase) InstallInData() bool {
}
func (a *ModuleBase) generateModuleTarget(ctx blueprint.ModuleContext) {
- if a != ctx.FinalModule().(Module).base() {
- return
- }
-
allInstalledFiles := Paths{}
allCheckbuildFiles := Paths{}
ctx.VisitAllModuleVariants(func(module blueprint.Module) {
@@ -439,21 +435,21 @@ func (a *ModuleBase) GenerateBuildActions(ctx blueprint.ModuleContext) {
missingDeps: ctx.GetMissingDependencies(),
}
- if !a.Enabled() {
- return
- }
+ if a.Enabled() {
+ a.module.GenerateAndroidBuildActions(androidCtx)
+ if ctx.Failed() {
+ return
+ }
- a.module.GenerateAndroidBuildActions(androidCtx)
- if ctx.Failed() {
- return
+ a.installFiles = append(a.installFiles, androidCtx.installFiles...)
+ a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
}
- a.installFiles = append(a.installFiles, androidCtx.installFiles...)
- a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
-
- a.generateModuleTarget(ctx)
- if ctx.Failed() {
- return
+ if a == ctx.FinalModule().(Module).base() {
+ a.generateModuleTarget(ctx)
+ if ctx.Failed() {
+ return
+ }
}
}