summaryrefslogtreecommitdiff
path: root/rust/image.go
diff options
context:
space:
mode:
author Justin Yun <justinyun@google.com> 2021-02-03 19:24:13 +0900
committer Justin Yun <justinyun@google.com> 2021-02-03 19:42:29 +0900
commitcbca373efafdbaf494c2a4ad11c2c89570014cd4 (patch)
tree018edfd1b12823c9c9a4f1369307eb9876f44d3b /rust/image.go
parente1f9b35d9250b7c0f5290e7da70ee71945d2b15e (diff)
Use target dependent module to update the name suffix
The module names for vendor and product variants have the image variant suffix to avoid conflict with the core modules. It requires updating the module names in the dependency tree with the suffixes. We had a hidden bug that used the original module properties to update the names of its dependent modules. Also, it must cover the product variants modules. Test: updated cc_test.go and build Change-Id: I6b4ea062d13c8fac1e699138d44376e52e0d7852
Diffstat (limited to 'rust/image.go')
-rw-r--r--rust/image.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/image.go b/rust/image.go
index 5ff10ae22..ac8c1b32c 100644
--- a/rust/image.go
+++ b/rust/image.go
@@ -71,6 +71,15 @@ func (mod *Module) HasVendorVariant() bool {
return Bool(mod.VendorProperties.Vendor_available) || Bool(mod.VendorProperties.Odm_available)
}
+// Always returns false because rust modules do not support product variant.
+func (mod *Module) HasProductVariant() bool {
+ return Bool(mod.VendorProperties.Product_available)
+}
+
+func (mod *Module) HasNonSystemVariants() bool {
+ return mod.HasVendorVariant() || mod.HasProductVariant()
+}
+
func (c *Module) InProduct() bool {
return false
}