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
This commit is contained in:
@@ -1441,7 +1441,11 @@ func (ctx *androidModuleContext) ExpandSourcesSubDir(srcFiles, excludes []string
|
|||||||
if m := SrcIsModule(e); m != "" {
|
if m := SrcIsModule(e); m != "" {
|
||||||
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
|
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
|
||||||
if module == nil {
|
if module == nil {
|
||||||
|
if ctx.Config().AllowMissingDependencies() {
|
||||||
|
ctx.AddMissingDependencies([]string{m})
|
||||||
|
} else {
|
||||||
ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
|
ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if srcProducer, ok := module.(SourceFileProducer); ok {
|
if srcProducer, ok := module.(SourceFileProducer); ok {
|
||||||
@@ -1458,7 +1462,11 @@ func (ctx *androidModuleContext) ExpandSourcesSubDir(srcFiles, excludes []string
|
|||||||
if m := SrcIsModule(s); m != "" {
|
if m := SrcIsModule(s); m != "" {
|
||||||
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
|
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
|
||||||
if module == nil {
|
if module == nil {
|
||||||
|
if ctx.Config().AllowMissingDependencies() {
|
||||||
|
ctx.AddMissingDependencies([]string{m})
|
||||||
|
} else {
|
||||||
ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
|
ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if srcProducer, ok := module.(SourceFileProducer); ok {
|
if srcProducer, ok := module.(SourceFileProducer); ok {
|
||||||
|
Reference in New Issue
Block a user