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
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index 064992f..8fef010 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -17,6 +17,8 @@
import (
"encoding/json"
"io/ioutil"
+
+ "android/soong/android"
)
// GlobalConfig stores the configuration for dex preopting set by the product
@@ -66,9 +68,9 @@
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 @@
UsesLibraries []string
LibraryPaths map[string]string
- Archs []string
+ Archs []android.ArchType
DexPreoptImages []string
PreoptExtractedApk bool // Overrides OnlyPreoptModules