Don't check ABIs in SecondArchIsTranslated

SecondArchIsTranslated is only used to determine whether or not to
dexpreopt the second arch, so it should return false for the case
where the primary and secondary arches are X86_64 and X86, but the
primary arch also lists an Arm ABI.

Bug: 124711830
Test: m on failing build
Change-Id: I6afc2fdda466e0c406dbeada2e9c3df2bb6853bf
This commit is contained in:
Colin Cross
2019-02-19 10:12:28 -08:00
parent 4f41bc2bed
commit 93a9e5e3a2

View File

@@ -948,6 +948,8 @@ func findOverrideValue(overrides []string, name string, errorMsg string) (newVal
return "", false
}
// SecondArchIsTranslated returns true if the primary device arch is X86 or X86_64 and the device also has an arch
// that is Arm or Arm64.
func (c *config) SecondArchIsTranslated() bool {
deviceTargets := c.Targets[Android]
if len(deviceTargets) < 2 {
@@ -956,8 +958,7 @@ func (c *config) SecondArchIsTranslated() bool {
arch := deviceTargets[0].Arch
return (arch.ArchType == X86 || arch.ArchType == X86_64) &&
(hasArmAbi(arch) || hasArmAndroidArch(deviceTargets))
return (arch.ArchType == X86 || arch.ArchType == X86_64) && hasArmAndroidArch(deviceTargets)
}
func (c *config) IntegerOverflowDisabledForPath(path string) bool {