make arch and variant parsing more robust
Post-process the arch and cpu variants to treat the arch name or "generic" as an empty variant. Filter out extra empty abis. Ignore empty arches. Print a useful error message when appending properties fails to find the target field, when an unknown architecture is used, or when a toolchain has not been implemented for the selected architecture. Change-Id: I671d4cd04975f4f29aefc4267b3a624868ce6a75
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -409,8 +409,8 @@ func (c *CCBase) findToolchain(ctx common.AndroidModuleContext) Toolchain {
|
||||
hod := ctx.HostOrDevice()
|
||||
factory := toolchainFactories[hod][arch.ArchType]
|
||||
if factory == nil {
|
||||
panic(fmt.Sprintf("Toolchain not found for %s arch %q",
|
||||
hod.String(), arch.String()))
|
||||
ctx.ModuleErrorf("Toolchain not found for %s arch %q", hod.String(), arch.String())
|
||||
return nil
|
||||
}
|
||||
return factory(arch.ArchVariant, arch.CpuVariant)
|
||||
}
|
||||
|
Reference in New Issue
Block a user