Propagate missing dependencies when using whole_static_libs

Currently, whole_static_libs with missing dependencies are silently
ignored. Instead, when getting the object files from the other module,
add its missing dependencies to the current module.

Change-Id: I12472dede2dfafdded56268bfd37f60063b637c4
diff --git a/common/module.go b/common/module.go
index 844db7f..8e45952 100644
--- a/common/module.go
+++ b/common/module.go
@@ -79,6 +79,8 @@
 	InstallFile(installPath OutputPath, srcPath Path, deps ...Path) Path
 	InstallFileName(installPath OutputPath, name string, srcPath Path, deps ...Path) Path
 	CheckbuildFile(srcPath Path)
+
+	AddMissingDependencies(deps []string)
 }
 
 type AndroidModule interface {
@@ -482,6 +484,12 @@
 	return a.missingDeps
 }
 
+func (a *androidModuleContext) AddMissingDependencies(deps []string) {
+	if deps != nil {
+		a.missingDeps = append(a.missingDeps, deps...)
+	}
+}
+
 func (a *androidBaseContextImpl) Arch() Arch {
 	return a.arch
 }