diff options
| author | 2017-10-24 01:28:59 +0000 | |
|---|---|---|
| committer | 2017-10-24 01:28:59 +0000 | |
| commit | d602bc1cda3e72c9415f05e59b194056eed700df (patch) | |
| tree | 43f4a95df59ced1739dcc352bfd9822832fa4f04 /java/java.go | |
| parent | 0c503f1e80a01537371ebede62853d6b6dfa4d76 (diff) | |
| parent | 1e45cb77a0fdd774e672a84d8fc3c90eb4f56da3 (diff) | |
Fail when a module depends on a disabled module
am: 1e45cb77a0
Change-Id: I454b353606584838764ebc4d83d6568286b65bcc
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index 8941b4d7f..c12ada277 100644 --- a/java/java.go +++ b/java/java.go @@ -410,6 +410,21 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { otherName := ctx.OtherModuleName(module) tag := ctx.OtherModuleDependencyTag(module) + aDep, _ := module.(android.Module) + if aDep == nil { + ctx.ModuleErrorf("module %q not an android module", ctx.OtherModuleName(aDep)) + return + } + + if !aDep.Enabled() { + if ctx.AConfig().AllowMissingDependencies() { + ctx.AddMissingDependencies([]string{ctx.OtherModuleName(aDep)}) + } else { + ctx.ModuleErrorf("depends on disabled module %q", ctx.OtherModuleName(aDep)) + } + return + } + dep, _ := module.(Dependency) if dep == nil { switch tag { |