Move imageMutator before archMutator

Run the imageMutator between osMutator and archMutator so that
different arch variants can be set for the different partitions.

Bug: 142286466
Test: m checkbuild
Change-Id: I65d05714b75aa462bf9816da60fdc2deda4de593
Merged-In: I65d05714b75aa462bf9816da60fdc2deda4de593
(cherry picked from commit 9c8f687584)
This commit is contained in:
Colin Cross
2019-11-20 17:12:35 -08:00
parent bd0624304e
commit fb0c16e95a
9 changed files with 70 additions and 41 deletions

View File

@@ -1005,6 +1005,7 @@ func determineModuleKind(m *ModuleBase, ctx blueprint.BaseModuleContext) moduleK
func (m *ModuleBase) baseModuleContextFactory(ctx blueprint.BaseModuleContext) baseModuleContext {
return baseModuleContext{
BaseModuleContext: ctx,
os: m.commonProperties.CompileOS,
target: m.commonProperties.CompileTarget,
targetPrimary: m.commonProperties.CompilePrimary,
multiTargets: m.commonProperties.CompileMultiTargets,
@@ -1117,6 +1118,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
type baseModuleContext struct {
blueprint.BaseModuleContext
os OsType
target Target
multiTargets []Target
targetPrimary bool
@@ -1460,27 +1462,27 @@ func (b *baseModuleContext) Arch() Arch {
}
func (b *baseModuleContext) Os() OsType {
return b.target.Os
return b.os
}
func (b *baseModuleContext) Host() bool {
return b.target.Os.Class == Host || b.target.Os.Class == HostCross
return b.os.Class == Host || b.os.Class == HostCross
}
func (b *baseModuleContext) Device() bool {
return b.target.Os.Class == Device
return b.os.Class == Device
}
func (b *baseModuleContext) Darwin() bool {
return b.target.Os == Darwin
return b.os == Darwin
}
func (b *baseModuleContext) Fuchsia() bool {
return b.target.Os == Fuchsia
return b.os == Fuchsia
}
func (b *baseModuleContext) Windows() bool {
return b.target.Os == Windows
return b.os == Windows
}
func (b *baseModuleContext) Debug() bool {