Make all soong modules optional when building in make
When building inside make, Soong is not responsible for installing any
modules, so make everything optional.
Change-Id: I1190c78663c9d5ff6f511ca43b317031c619afe7
diff --git a/common/module.go b/common/module.go
index c22f000..e03b006 100644
--- a/common/module.go
+++ b/common/module.go
@@ -313,6 +313,7 @@
Rule: blueprint.Phony,
Outputs: []string{name},
Implicits: allInstalledFiles.Strings(),
+ Optional: ctx.Config().(Config).EmbeddedInMake(),
})
deps = append(deps, name)
a.installTarget = name
@@ -471,7 +472,7 @@
Output: fullInstallPath,
Input: srcPath,
OrderOnly: Paths(deps),
- Default: true,
+ Default: !a.AConfig().EmbeddedInMake(),
})
a.installFiles = append(a.installFiles, fullInstallPath)