diff --git a/cc/cc.go b/cc/cc.go index 65250475c..0ea471300 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -834,7 +834,11 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { } if !a.Enabled() { - ctx.ModuleErrorf("depends on disabled module %q", name) + if ctx.AConfig().AllowMissingDependencies() { + ctx.AddMissingDependencies([]string{name}) + } else { + ctx.ModuleErrorf("depends on disabled module %q", name) + } return }