Split out osMutator from archMutator

Split the archMutator into two mutators, osMutator to create
android/linux/darwin variants, and archMutator to then further
split them into arm/arm64, etc.  When combined with alias
variants in Blueprint this will allow us to depend on the
"android" variant without having to know what architectures
were used to build it.

Test: m checkbuild
Change-Id: I0f51d60fc440cf5ae503904ce7849ec797af5fe2
This commit is contained in:
Colin Cross
2019-10-16 11:07:20 -07:00
parent 158eeb7701
commit a195f91471
3 changed files with 206 additions and 140 deletions

View File

@@ -417,6 +417,7 @@ type commonProperties struct {
} `android:"arch_variant"`
// Set by TargetMutator
CompileOS OsType `blueprint:"mutated"`
CompileTarget Target `blueprint:"mutated"`
CompileMultiTargets []Target `blueprint:"mutated"`
CompilePrimary bool `blueprint:"mutated"`
@@ -719,12 +720,6 @@ func (m *ModuleBase) visibility() []string {
}
}
func (m *ModuleBase) SetTarget(target Target, multiTargets []Target, primary bool) {
m.commonProperties.CompileTarget = target
m.commonProperties.CompileMultiTargets = multiTargets
m.commonProperties.CompilePrimary = primary
}
func (m *ModuleBase) Target() Target {
return m.commonProperties.CompileTarget
}