Allow disabled dependencies when SOONG_ALLOW_MISSING_DEPENDENCIES is set

Push the "depens on a disabled module" dependency to runtime when
SOONG_ALLOW_MISSING_DEPENDENCIES is set so that subsets of the tree
can build when some modules are disabled.

Test: external/clang/build.py on llvm branch
Change-Id: I47e4f41d04aa3df173757f03a0c581b0bafb93f0
This commit is contained in:
Colin Cross 2016-12-13 12:51:11 -08:00
parent bb2e2b7d7f
commit a8f5e9a8b2
1 changed files with 5 additions and 1 deletions

View File

@ -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
}