Merge "Cleanup ImageInterface.SetImageVariation" into main am: 77858402e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3131759 Change-Id: I4504623d0978356eb7f3b526d01ffb99abd0da12 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
27
cc/image.go
27
cc/image.go
@@ -527,30 +527,29 @@ func squashRamdiskSrcs(m *Module) {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Module) SetImageVariation(ctx android.BaseModuleContext, variant string, module android.Module) {
|
||||
m := module.(*Module)
|
||||
func (c *Module) SetImageVariation(ctx android.BaseModuleContext, variant string) {
|
||||
if variant == android.RamdiskVariation {
|
||||
m.MakeAsPlatform()
|
||||
squashRamdiskSrcs(m)
|
||||
c.MakeAsPlatform()
|
||||
squashRamdiskSrcs(c)
|
||||
} else if variant == android.VendorRamdiskVariation {
|
||||
m.MakeAsPlatform()
|
||||
squashVendorRamdiskSrcs(m)
|
||||
c.MakeAsPlatform()
|
||||
squashVendorRamdiskSrcs(c)
|
||||
} else if variant == android.RecoveryVariation {
|
||||
m.MakeAsPlatform()
|
||||
squashRecoverySrcs(m)
|
||||
c.MakeAsPlatform()
|
||||
squashRecoverySrcs(c)
|
||||
} else if strings.HasPrefix(variant, VendorVariation) {
|
||||
m.Properties.ImageVariation = VendorVariation
|
||||
c.Properties.ImageVariation = VendorVariation
|
||||
|
||||
if strings.HasPrefix(variant, VendorVariationPrefix) {
|
||||
m.Properties.VndkVersion = strings.TrimPrefix(variant, VendorVariationPrefix)
|
||||
c.Properties.VndkVersion = strings.TrimPrefix(variant, VendorVariationPrefix)
|
||||
}
|
||||
squashVendorSrcs(m)
|
||||
squashVendorSrcs(c)
|
||||
} else if strings.HasPrefix(variant, ProductVariation) {
|
||||
m.Properties.ImageVariation = ProductVariation
|
||||
c.Properties.ImageVariation = ProductVariation
|
||||
if strings.HasPrefix(variant, ProductVariationPrefix) {
|
||||
m.Properties.VndkVersion = strings.TrimPrefix(variant, ProductVariationPrefix)
|
||||
c.Properties.VndkVersion = strings.TrimPrefix(variant, ProductVariationPrefix)
|
||||
}
|
||||
squashProductSrcs(m)
|
||||
squashProductSrcs(c)
|
||||
}
|
||||
|
||||
if c.NeedsVendorPublicLibraryVariants() &&
|
||||
|
Reference in New Issue
Block a user