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
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -361,6 +361,8 @@ type BaseProperties struct {
|
||||
Recovery_available *bool
|
||||
|
||||
// Used by imageMutator, set by ImageMutatorBegin()
|
||||
VendorVariantNeeded bool `blueprint:"mutated"`
|
||||
ProductVariantNeeded bool `blueprint:"mutated"`
|
||||
CoreVariantNeeded bool `blueprint:"mutated"`
|
||||
RamdiskVariantNeeded bool `blueprint:"mutated"`
|
||||
VendorRamdiskVariantNeeded bool `blueprint:"mutated"`
|
||||
@@ -2509,7 +2511,7 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
||||
if c.ImageVariation().Variation == android.CoreVariation && c.Device() &&
|
||||
c.Target().NativeBridge == android.NativeBridgeDisabled {
|
||||
actx.AddVariationDependencies(
|
||||
[]blueprint.Variation{{Mutator: "image", Variation: VendorVariation}},
|
||||
[]blueprint.Variation{{Mutator: "image", Variation: android.VendorVariation}},
|
||||
llndkHeaderLibTag,
|
||||
deps.LlndkHeaderLibs...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user