Support no configured device architectures
am: 3f32f03067
Change-Id: I2bce3feca58df2e9682bef04ee39232f58185d52
This commit is contained in:
@@ -435,6 +435,11 @@ func ArchMutator(mctx BottomUpMutatorContext) {
|
||||
moduleTargets = append(moduleTargets, targets...)
|
||||
}
|
||||
|
||||
if len(moduleTargets) == 0 {
|
||||
module.base().commonProperties.Enabled = boolPtr(false)
|
||||
return
|
||||
}
|
||||
|
||||
targetNames := make([]string, len(moduleTargets))
|
||||
|
||||
for i, target := range moduleTargets {
|
||||
@@ -762,10 +767,7 @@ func decodeTargetProductVariables(config Config) (map[OsClass][]Target, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if variables.DeviceArch == nil {
|
||||
return nil, fmt.Errorf("No device primary architecture set")
|
||||
}
|
||||
|
||||
if variables.DeviceArch != nil && *variables.DeviceArch != "" {
|
||||
addTarget(Android, *variables.DeviceArch, variables.DeviceArchVariant,
|
||||
variables.DeviceCpuVariant, variables.DeviceAbi)
|
||||
|
||||
@@ -779,6 +781,7 @@ func decodeTargetProductVariables(config Config) (map[OsClass][]Target, error) {
|
||||
deviceArches[1].Arch.Native = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if targetErr != nil {
|
||||
return nil, targetErr
|
||||
|
Reference in New Issue
Block a user