Revert "Simplify arch target handling"

This reverts commit 6713fb26cbcadf525cd75e47d7d0cbc23d282b3e.

Change-Id: Ic473cea2563b0b37dc08b0bc5d3a0ac8c4b6afe6
This commit is contained in:
Colin Cross
2016-06-03 01:50:47 +00:00
parent 54c7112c43
commit b9db480385
19 changed files with 474 additions and 360 deletions

View File

@@ -54,8 +54,8 @@ type config struct {
ConfigFileName string
ProductVariablesFileName string
Targets map[OsClass][]Target
BuildOsVariant string
DeviceArches []Arch
HostArches map[HostType][]Arch
srcDir string // the path of the root source directory
buildDir string // the path of the build output directory
@@ -175,21 +175,20 @@ func NewConfig(srcDir, buildDir string) (Config, error) {
config.inMake = true
}
targets, err := decodeTargetProductVariables(config)
hostArches, deviceArches, err := decodeArchProductVariables(config.ProductVariables)
if err != nil {
return Config{}, err
}
if Bool(config.Mega_device) {
deviceTargets, err := decodeMegaDevice()
deviceArches, err = decodeMegaDevice()
if err != nil {
return Config{}, err
}
targets[Device] = deviceTargets
}
config.Targets = targets
config.BuildOsVariant = targets[Host][0].String()
config.HostArches = hostArches
config.DeviceArches = deviceArches
return config, nil
}
@@ -326,13 +325,3 @@ 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
}