Merge "Fix: recovery module is disabled on 32-bit targets"
This commit is contained in:
commit
bdf16ec5b2
2 changed files with 10 additions and 16 deletions
|
@ -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()
|
||||
}
|
||||
|
|
22
cc/cc.go
22
cc/cc.go
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue