Merge "Fix: recovery module is disabled on 32-bit targets"

This commit is contained in:
Treehugger Robot 2018-07-10 01:36:42 +00:00 committed by Gerrit Code Review
commit bdf16ec5b2
2 changed files with 10 additions and 16 deletions

View file

@ -576,6 +576,10 @@ func (c *config) DevicePrefer32BitExecutables() bool {
return Bool(c.productVariables.DevicePrefer32BitExecutables)
}
func (c *config) DevicePrimaryArchType() ArchType {
return c.Targets[Device][0].Arch.ArchType
}
func (c *config) SkipDeviceInstall() bool {
return c.EmbeddedInMake()
}

View file

@ -1570,14 +1570,9 @@ func imageMutator(mctx android.BottomUpMutatorContext) {
}
if recoveryVariantNeeded {
var recoveryMultilib string
if mctx.Config().DevicePrefer32BitExecutables() {
recoveryMultilib = "lib32"
} else {
recoveryMultilib = "lib64"
}
multilib := genrule.Target().Arch.ArchType.Multilib
if multilib != recoveryMultilib {
primaryArch := mctx.Config().DevicePrimaryArchType()
moduleArch := genrule.Target().Arch.ArchType
if moduleArch != primaryArch {
recoveryVariantNeeded = false
}
}
@ -1690,14 +1685,9 @@ func imageMutator(mctx android.BottomUpMutatorContext) {
}
if recoveryVariantNeeded {
var recoveryMultilib string
if mctx.Config().DevicePrefer32BitExecutables() {
recoveryMultilib = "lib32"
} else {
recoveryMultilib = "lib64"
}
multilib := m.Target().Arch.ArchType.Multilib
if multilib != recoveryMultilib {
primaryArch := mctx.Config().DevicePrimaryArchType()
moduleArch := m.Target().Arch.ArchType
if moduleArch != primaryArch {
recoveryVariantNeeded = false
}
}