Support arm_on_x86 properties
am: bb2e2b7d7f
Change-Id: I6e14207cbbdef52bf5eb46414390ed153b97e383
This commit is contained in:
commit
8d2d70313a
1 changed files with 23 additions and 0 deletions
|
@ -444,6 +444,8 @@ func createArchType(props reflect.Type) reflect.Type {
|
|||
"Android64",
|
||||
"Android32",
|
||||
"Not_windows",
|
||||
"Arm_on_x86",
|
||||
"Arm_on_x86_64",
|
||||
}
|
||||
for _, os := range osTypeList {
|
||||
targets = append(targets, os.Field)
|
||||
|
@ -712,6 +714,17 @@ func (a *ModuleBase) setArchProperties(ctx BottomUpMutatorContext) {
|
|||
a.appendProperties(ctx, genProps, targetProp, field, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
if arch.ArchType == X86 && hasArmAbi(arch) {
|
||||
field := "Arm_on_x86"
|
||||
prefix := "target.arm_on_x86"
|
||||
a.appendProperties(ctx, genProps, targetProp, field, prefix)
|
||||
}
|
||||
if arch.ArchType == X86_64 && hasArmAbi(arch) {
|
||||
field := "Arm_on_x86_64"
|
||||
prefix := "target.arm_on_x86_64"
|
||||
a.appendProperties(ctx, genProps, targetProp, field, prefix)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -805,6 +818,16 @@ func decodeTargetProductVariables(config *config) (map[OsClass][]Target, error)
|
|||
return targets, nil
|
||||
}
|
||||
|
||||
// hasArmAbi returns true if arch has at least one arm ABI
|
||||
func hasArmAbi(arch Arch) bool {
|
||||
for _, abi := range arch.Abi {
|
||||
if strings.HasPrefix(abi, "arm") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type archConfig struct {
|
||||
arch string
|
||||
archVariant string
|
||||
|
|
Loading…
Reference in a new issue