Add vendor-ramdisk image to Soong.
Add vendor_ramdisk_available and vendor_ramdisk attribute to
various rules. When a vendor_ramdisk variant of a module is
generated, it is installed to $OUT/vendor-ramdisk.
It is similar to a ramdisk image.
Test: m nothing -j
Change-Id: Ib2d16459f3094dbe21c3bdb7c016cb4b2bf62765
diff --git a/cc/genrule.go b/cc/genrule.go
index cce4a83..a5a58d2 100644
--- a/cc/genrule.go
+++ b/cc/genrule.go
@@ -24,10 +24,11 @@
}
type GenruleExtraProperties struct {
- Vendor_available *bool
- Ramdisk_available *bool
- Recovery_available *bool
- Sdk_version *string
+ Vendor_available *bool
+ Ramdisk_available *bool
+ Vendor_ramdisk_available *bool
+ Recovery_available *bool
+ Sdk_version *string
}
// cc_genrule is a genrule that can depend on other cc_* objects.
@@ -68,6 +69,10 @@
return Bool(g.Ramdisk_available)
}
+func (g *GenruleExtraProperties) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
+ return Bool(g.Vendor_ramdisk_available)
+}
+
func (g *GenruleExtraProperties) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return Bool(g.Recovery_available)
}