summaryrefslogtreecommitdiff
path: root/rust/image.go
diff options
context:
space:
mode:
author Matthew Maurer <mmaurer@google.com> 2021-08-19 13:10:05 -0700
committer Matthew Maurer <mmaurer@google.com> 2021-08-20 12:14:54 -0700
commit9f59e8db270f58a3f2e4fe5bc041f84363a5877e (patch)
tree692e165ef13cfc5cb6c3fa53ad14b5956ea1019f /rust/image.go
parentc6868383f48cc6339c5baad61752bace03a2067d (diff)
rust: Hook up InstallIn functions + Product
InstallIn functions must be hooked up not only to install to special images, but also to receive special handling by android/arch.go such that some images are implicitly multilib: first. Also hook up more product details. Bug: 178565008 Bug: 165791368 Test: lunch aosp_arm64; m Change-Id: I1980d5aa9d55f78c222b98d60a404cd6ea5abbfb
Diffstat (limited to 'rust/image.go')
-rw-r--r--rust/image.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/rust/image.go b/rust/image.go
index 5d7c02733..5d57f1522 100644
--- a/rust/image.go
+++ b/rust/image.go
@@ -136,7 +136,13 @@ func (c *Module) VendorVariantToOdm() bool {
}
func (ctx *moduleContext) ProductSpecific() bool {
- return false
+ return ctx.ModuleContext.ProductSpecific() || ctx.RustModule().productSpecificModuleContext()
+}
+
+func (c *Module) productSpecificModuleContext() bool {
+ // Additionally check if this module is inProduct() that means it is a "product" variant of a
+ // module. As well as product specific modules, product variants must be installed to /product.
+ return c.InProduct()
}
func (mod *Module) InRecovery() bool {