Merge "Don't panic when DevicePrimaryArchType is called in a host only build"
This commit is contained in:
commit
9f5a9d1d54
1 changed files with 6 additions and 1 deletions
|
@ -892,8 +892,13 @@ func (c *config) Eng() bool {
|
||||||
return Bool(c.productVariables.Eng)
|
return Bool(c.productVariables.Eng)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DevicePrimaryArchType returns the ArchType for the first configured device architecture, or
|
||||||
|
// Common if there are no device architectures.
|
||||||
func (c *config) DevicePrimaryArchType() ArchType {
|
func (c *config) DevicePrimaryArchType() ArchType {
|
||||||
return c.Targets[Android][0].Arch.ArchType
|
if androidTargets := c.Targets[Android]; len(androidTargets) > 0 {
|
||||||
|
return androidTargets[0].Arch.ArchType
|
||||||
|
}
|
||||||
|
return Common
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *config) SanitizeHost() []string {
|
func (c *config) SanitizeHost() []string {
|
||||||
|
|
Loading…
Reference in a new issue