Update some comments about the image mutator.
Test: It's just comment changes. Change-Id: Idac69f5369caad028f3daa6aa5c1088d697c07e2
This commit is contained in:
@@ -43,10 +43,9 @@ type ImageInterface interface {
|
|||||||
// its variation.
|
// its variation.
|
||||||
ExtraImageVariations(ctx BaseModuleContext) []string
|
ExtraImageVariations(ctx BaseModuleContext) []string
|
||||||
|
|
||||||
// SetImageVariation will be passed a newly created recovery variant of the module. ModuleBase implements
|
// SetImageVariation is called for each newly created image variant. The receiver is the original
|
||||||
// SetImageVariation, most module types will not need to override it, and those that do must call the
|
// module, "variation" is the name of the newly created variant and "module" is the newly created
|
||||||
// overridden method. Implementors of SetImageVariation must be careful to modify the module argument
|
// variant itself.
|
||||||
// and not the receiver.
|
|
||||||
SetImageVariation(ctx BaseModuleContext, variation string, module Module)
|
SetImageVariation(ctx BaseModuleContext, variation string, module Module)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
cc/cc.go
13
cc/cc.go
@@ -290,8 +290,14 @@ type BaseProperties struct {
|
|||||||
// Set by DepsMutator.
|
// Set by DepsMutator.
|
||||||
AndroidMkSystemSharedLibs []string `blueprint:"mutated"`
|
AndroidMkSystemSharedLibs []string `blueprint:"mutated"`
|
||||||
|
|
||||||
|
// The name of the image this module is built for, suffixed with a '.'
|
||||||
ImageVariationPrefix string `blueprint:"mutated"`
|
ImageVariationPrefix string `blueprint:"mutated"`
|
||||||
|
|
||||||
|
// The VNDK version this module is built against. If empty, the module is not
|
||||||
|
// build against the VNDK.
|
||||||
VndkVersion string `blueprint:"mutated"`
|
VndkVersion string `blueprint:"mutated"`
|
||||||
|
|
||||||
|
// Suffix for the name of Android.mk entries generated by this module
|
||||||
SubName string `blueprint:"mutated"`
|
SubName string `blueprint:"mutated"`
|
||||||
|
|
||||||
// *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
|
// *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
|
||||||
@@ -315,12 +321,15 @@ type BaseProperties struct {
|
|||||||
// Make this module available when building for recovery
|
// Make this module available when building for recovery
|
||||||
Recovery_available *bool
|
Recovery_available *bool
|
||||||
|
|
||||||
// Set by imageMutator
|
// Used by imageMutator, set by ImageMutatorBegin()
|
||||||
CoreVariantNeeded bool `blueprint:"mutated"`
|
CoreVariantNeeded bool `blueprint:"mutated"`
|
||||||
RamdiskVariantNeeded bool `blueprint:"mutated"`
|
RamdiskVariantNeeded bool `blueprint:"mutated"`
|
||||||
VendorRamdiskVariantNeeded bool `blueprint:"mutated"`
|
VendorRamdiskVariantNeeded bool `blueprint:"mutated"`
|
||||||
RecoveryVariantNeeded bool `blueprint:"mutated"`
|
RecoveryVariantNeeded bool `blueprint:"mutated"`
|
||||||
ExtraVariants []string `blueprint:"mutated"`
|
|
||||||
|
// A list of variations for the "image" mutator of the form
|
||||||
|
//<image name> '.' <version char>, for example, 'vendor.S'
|
||||||
|
ExtraVersionedImageVariations []string `blueprint:"mutated"`
|
||||||
|
|
||||||
// Allows this module to use non-APEX version of libraries. Useful
|
// Allows this module to use non-APEX version of libraries. Useful
|
||||||
// for building binaries that are started before APEXes are activated.
|
// for building binaries that are started before APEXes are activated.
|
||||||
|
@@ -341,11 +341,11 @@ func (m *Module) RecoveryAvailable() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Module) ExtraVariants() []string {
|
func (m *Module) ExtraVariants() []string {
|
||||||
return m.Properties.ExtraVariants
|
return m.Properties.ExtraVersionedImageVariations
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Module) AppendExtraVariant(extraVariant string) {
|
func (m *Module) AppendExtraVariant(extraVariant string) {
|
||||||
m.Properties.ExtraVariants = append(m.Properties.ExtraVariants, extraVariant)
|
m.Properties.ExtraVersionedImageVariations = append(m.Properties.ExtraVersionedImageVariations, extraVariant)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Module) SetRamdiskVariantNeeded(b bool) {
|
func (m *Module) SetRamdiskVariantNeeded(b bool) {
|
||||||
@@ -629,7 +629,7 @@ func (c *Module) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Module) ExtraImageVariations(ctx android.BaseModuleContext) []string {
|
func (c *Module) ExtraImageVariations(ctx android.BaseModuleContext) []string {
|
||||||
return c.Properties.ExtraVariants
|
return c.Properties.ExtraVersionedImageVariations
|
||||||
}
|
}
|
||||||
|
|
||||||
func squashVendorSrcs(m *Module) {
|
func squashVendorSrcs(m *Module) {
|
||||||
|
Reference in New Issue
Block a user