Merge "Don't panic when DevicePrimaryArchType is called in a host only build" am: 9f5a9d1d54 am: 11f79516e2 am: 278415109a am: 0c631f19e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1915495 Change-Id: I19b8de60658cf4bd164b3357c0125318e96645d5
This commit is contained in:
@@ -892,8 +892,13 @@ func (c *config) Eng() bool {
|
||||
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 {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user