diff options
Diffstat (limited to 'android/config.go')
-rw-r--r-- | android/config.go | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/android/config.go b/android/config.go index ee95d2ef..5024bcee 100644 --- a/android/config.go +++ b/android/config.go @@ -54,8 +54,8 @@ type config struct { ConfigFileName string ProductVariablesFileName string - DeviceArches []Arch - HostArches map[HostType][]Arch + Targets map[OsClass][]Target + BuildOsVariant string srcDir string // the path of the root source directory buildDir string // the path of the build output directory @@ -175,20 +175,21 @@ func NewConfig(srcDir, buildDir string) (Config, error) { config.inMake = true } - hostArches, deviceArches, err := decodeArchProductVariables(config.ProductVariables) + targets, err := decodeTargetProductVariables(config) if err != nil { return Config{}, err } if Bool(config.Mega_device) { - deviceArches, err = decodeMegaDevice() + deviceTargets, err := decodeMegaDevice() if err != nil { return Config{}, err } + targets[Device] = deviceTargets } - config.HostArches = hostArches - config.DeviceArches = deviceArches + config.Targets = targets + config.BuildOsVariant = targets[Host][0].String() return config, nil } @@ -325,3 +326,13 @@ func (c *config) SanitizeDevice() []string { } return *c.ProductVariables.SanitizeDevice } + +func (c *config) Android64() bool { + for _, t := range c.Targets[Device] { + if t.Arch.ArchType.Multilib == "lib64" { + return true + } + } + + return false +} |