summaryrefslogtreecommitdiff
path: root/genrule
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-06-19 00:51:16 +0000
committer Jihoon Kang <jihoonkang@google.com> 2024-06-21 07:45:09 +0000
commit47e918450f83fc5f2680c0a3f7d6d1209e031e7c (patch)
treec221fbc8fe3494e55dd25259b272e966644373dd /genrule
parent25cdff6815b51cf78ca433bccd5ba3165d26d41b (diff)
Move vendor and product variant generation logic from cc package to android package
Although image variation generation logic has moved out of cc package to the android package, the vendor and product partition variants generation logic is still specific to cc package. Therefore, in order to create a product or vendor variant, they have to specified in `ExtraImageVariants`. In order to avoid such confusing behaviors and enforce modules to specify product and vendor installation rules, this change moves the vendor and product variant generation logic to android.ImageInterface. Test: m nothing --no-skip-soong-tests && diff contents of out/soong/Android-{product}.mk Change-Id: I9e14f3739d9dea94167ee6a91e92b2f942055aba
Diffstat (limited to 'genrule')
-rw-r--r--genrule/genrule.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index b23530369..c0942d3f1 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -643,6 +643,8 @@ func generatorFactory(taskGenerator taskFunc, props ...interface{}) *Module {
type noopImageInterface struct{}
func (x noopImageInterface) ImageMutatorBegin(android.BaseModuleContext) {}
+func (x noopImageInterface) VendorVariantNeeded(android.BaseModuleContext) bool { return false }
+func (x noopImageInterface) ProductVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) CoreVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) RamdiskVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) VendorRamdiskVariantNeeded(android.BaseModuleContext) bool { return false }