From a8f5e9a8b27e262c029443c6de0ae6ba0e1bca7f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 13 Dec 2016 12:51:11 -0800 Subject: [PATCH] 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 --- cc/cc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }