diff options
author | 2019-11-18 16:00:16 -0800 | |
---|---|---|
committer | 2019-11-20 15:21:32 -0800 | |
commit | 7228ecd5e3c9282e7e6f4a81d81fd333cb08eaff (patch) | |
tree | b08a1652d573a01819c7937ad22659429f50578f /rust/rust.go | |
parent | 43b92e0d0f477e2ae9f3c3e07696e2d1760b7d84 (diff) |
Move cc.imageMutator into the android package
Prepare for making the image mutator available to all modules and
moving it between the os and arch mutators by moving it into the
android package and using an interface implemented by the module
types to control it.
Bug: 142286466
Test: No unexpected changes to out/soong/build.ninja
Change-Id: I0dcc9c7b5ec80edffade340c367f6ae4da34151b
Diffstat (limited to 'rust/rust.go')
-rw-r--r-- | rust/rust.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/rust/rust.go b/rust/rust.go index 8782f8ec0..56f94cf6d 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -77,6 +77,25 @@ type Module struct { outputFile android.OptionalPath } +var _ android.ImageInterface = (*Module)(nil) + +func (mod *Module) ImageMutatorBegin(ctx android.BaseModuleContext) {} + +func (mod *Module) CoreVariantNeeded(ctx android.BaseModuleContext) bool { + return true +} + +func (mod *Module) RecoveryVariantNeeded(android.BaseModuleContext) bool { + return mod.InRecovery() +} + +func (mod *Module) ExtraImageVariations(android.BaseModuleContext) []string { + return nil +} + +func (c *Module) SetImageVariation(ctx android.BaseModuleContext, variant string, module android.Module) { +} + func (mod *Module) BuildStubs() bool { return false } @@ -674,7 +693,7 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) { blueprint.Variation{Mutator: "version", Variation: ""}) if !mod.Host() { commonDepVariations = append(commonDepVariations, - blueprint.Variation{Mutator: "image", Variation: "core"}) + blueprint.Variation{Mutator: "image", Variation: android.CoreVariation}) } actx.AddVariationDependencies( |