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/androidmk.go b/cc/androidmk.go
index 5c55053..eccc4c9 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -24,12 +24,13 @@
)
var (
- nativeBridgeSuffix = ".native_bridge"
- productSuffix = ".product"
- vendorSuffix = ".vendor"
- ramdiskSuffix = ".ramdisk"
- recoverySuffix = ".recovery"
- sdkSuffix = ".sdk"
+ nativeBridgeSuffix = ".native_bridge"
+ productSuffix = ".product"
+ vendorSuffix = ".vendor"
+ ramdiskSuffix = ".ramdisk"
+ vendorRamdiskSuffix = ".vendor_ramdisk"
+ recoverySuffix = ".recovery"
+ sdkSuffix = ".sdk"
)
type AndroidMkContext interface {
@@ -42,6 +43,7 @@
VndkVersion() string
static() bool
InRamdisk() bool
+ InVendorRamdisk() bool
InRecovery() bool
AnyVariantDirectlyInAnyApex() bool
}
@@ -278,7 +280,7 @@
})
}
if len(library.Properties.Stubs.Versions) > 0 && !ctx.Host() && ctx.AnyVariantDirectlyInAnyApex() &&
- !ctx.InRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() && !ctx.static() {
+ !ctx.InRamdisk() && !ctx.InVendorRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() && !ctx.static() {
if library.buildStubs() && library.isLatestStubVersion() {
// reference the latest version via its name without suffix when it is provided by apex
entries.SubName = ""