Fix ALLOW_MISSING_DEPENDENCIES=true builds
Don't error out immediately if a SourceDepTag dependency is missing
if ALLOW_MISSING_DEPENDENCIES=true is set.
Test: forrest on unbundled build
Change-Id: I9077013e09e3ad0e90ae5163b26aace5b263e63a
diff --git a/android/module.go b/android/module.go
index 64fbdac..c1f3e79 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1441,7 +1441,11 @@
if m := SrcIsModule(e); m != "" {
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
if module == nil {
- ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
+ if ctx.Config().AllowMissingDependencies() {
+ ctx.AddMissingDependencies([]string{m})
+ } else {
+ ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
+ }
continue
}
if srcProducer, ok := module.(SourceFileProducer); ok {
@@ -1458,7 +1462,11 @@
if m := SrcIsModule(s); m != "" {
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
if module == nil {
- ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
+ if ctx.Config().AllowMissingDependencies() {
+ ctx.AddMissingDependencies([]string{m})
+ } else {
+ ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
+ }
continue
}
if srcProducer, ok := module.(SourceFileProducer); ok {