Use ArchType in dexpreopt config

Make ArchType implement the encoding.TextMarshaller and
encoding.TextUnmarshaller interfaces so that it can be used
as a value in the dexpreopt config structs that are passed
through JSON files.

Test: m checkbuild
Change-Id: Ie4c12443e7ee5fe43f42d5403bcde12d62f617e2
This commit is contained in:
Colin Cross
2019-02-11 15:11:14 -08:00
parent 1cd8a57510
commit 74ba962d29
5 changed files with 36 additions and 15 deletions

View File

@@ -17,6 +17,8 @@ package dexpreopt
import (
"encoding/json"
"io/ioutil"
"android/soong/android"
)
// GlobalConfig stores the configuration for dex preopting set by the product
@@ -66,9 +68,9 @@ type GlobalConfig struct {
EmptyDirectory string // path to an empty directory
DefaultDexPreoptImage map[string]string // default boot image location for each architecture
CpuVariant map[string]string // cpu variant for each architecture
InstructionSetFeatures map[string]string // instruction set for each architecture
DefaultDexPreoptImage map[android.ArchType]string // default boot image location for each architecture
CpuVariant map[android.ArchType]string // cpu variant for each architecture
InstructionSetFeatures map[android.ArchType]string // instruction set for each architecture
Tools Tools // paths to tools possibly used by the generated commands
}
@@ -103,7 +105,7 @@ type ModuleConfig struct {
UsesLibraries []string
LibraryPaths map[string]string
Archs []string
Archs []android.ArchType
DexPreoptImages []string
PreoptExtractedApk bool // Overrides OnlyPreoptModules