Add method to determine variations from a Target

The arch variants are hardcoded in every module type.  Refactor
them out into a Target.Variations() method in preparation for
splitting the arch mutator into two, which will require using
different variations.

Test: m checkbuild
Change-Id: I28ef7cd5168095ac888fe77f04e27f9ad81978c0
This commit is contained in:
Colin Cross
2019-10-16 11:03:10 -07:00
parent e8ba308dcf
commit 0f7d2ef3ac
15 changed files with 92 additions and 99 deletions

View File

@@ -199,19 +199,19 @@ func (a *AndroidMkEntries) fillInEntries(config Config, bpPath string, mod bluep
switch amod.Os().Class {
case Host:
// Make cannot identify LOCAL_MODULE_HOST_ARCH:= common.
if archStr != "common" {
if amod.Arch().ArchType != Common {
a.SetString("LOCAL_MODULE_HOST_ARCH", archStr)
}
host = true
case HostCross:
// Make cannot identify LOCAL_MODULE_HOST_CROSS_ARCH:= common.
if archStr != "common" {
if amod.Arch().ArchType != Common {
a.SetString("LOCAL_MODULE_HOST_CROSS_ARCH", archStr)
}
host = true
case Device:
// Make cannot identify LOCAL_MODULE_TARGET_ARCH:= common.
if archStr != "common" {
if amod.Arch().ArchType != Common {
if amod.Target().NativeBridge {
hostArchStr := amod.Target().NativeBridgeHostArchName
if hostArchStr != "" {