Fix missing source module with ALLOW_MISSING_DEPENDENCIES=true
A module referenced with srcs: ":module" was not honoring ALLOW_MISSING_DEPENDENCIES=true. Don't fail if the module doesn't exist, an error will already have been produced by ExtractSourcesDeps. Bug: 68183622 Test: m ALLOW_MISSING_DEPENDENCIES=true Change-Id: Id806633d12ab2ecd78b532e1922e59824e5c20a8
This commit is contained in:
@@ -982,6 +982,10 @@ func (ctx *androidModuleContext) ExpandSourcesSubDir(srcFiles, excludes []string
|
|||||||
for _, s := range srcFiles {
|
for _, s := range srcFiles {
|
||||||
if m := SrcIsModule(s); m != "" {
|
if m := SrcIsModule(s); m != "" {
|
||||||
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
|
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
|
||||||
|
if module == nil {
|
||||||
|
// Error will have been handled by ExtractSourcesDeps
|
||||||
|
continue
|
||||||
|
}
|
||||||
if srcProducer, ok := module.(SourceFileProducer); ok {
|
if srcProducer, ok := module.(SourceFileProducer); ok {
|
||||||
expandedSrcFiles = append(expandedSrcFiles, srcProducer.Srcs()...)
|
expandedSrcFiles = append(expandedSrcFiles, srcProducer.Srcs()...)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user