Merge changes I7642c57b,I2120b40e
* changes: apex uses the first arch variant of prebuilt_etc modules sh_binary prefer 32bit when TARGET_PREFER_32_BIT
This commit is contained in:
commit
126c57b52d
2 changed files with 19 additions and 4 deletions
|
@ -196,6 +196,9 @@ func InitShBinaryModule(s *ShBinary) {
|
|||
// executable binary to <partition>/bin.
|
||||
func ShBinaryFactory() Module {
|
||||
module := &ShBinary{}
|
||||
module.Prefer32(func(ctx BaseModuleContext, base *ModuleBase, class OsClass) bool {
|
||||
return class == Device && ctx.Config().DevicePrefer32BitExecutables()
|
||||
})
|
||||
InitShBinaryModule(module)
|
||||
InitAndroidArchModule(module, HostAndDeviceSupported, MultilibFirst)
|
||||
return module
|
||||
|
|
20
apex/apex.go
20
apex/apex.go
|
@ -598,10 +598,6 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||
a.properties.Multilib.First.Tests,
|
||||
target,
|
||||
a.getImageVariation(config))
|
||||
|
||||
// When multilib.* is omitted for prebuilts, it implies multilib.first.
|
||||
ctx.AddFarVariationDependencies(target.Variations(),
|
||||
prebuiltTag, a.properties.Prebuilts...)
|
||||
}
|
||||
|
||||
switch target.Arch.ArchType.Multilib {
|
||||
|
@ -652,6 +648,22 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||
|
||||
}
|
||||
|
||||
// For prebuilt_etc, use the first variant (64 on 64/32bit device,
|
||||
// 32 on 32bit device) regardless of the TARGET_PREFER_* setting.
|
||||
// b/144532908
|
||||
archForPrebuiltEtc := config.Arches()[0]
|
||||
for _, arch := range config.Arches() {
|
||||
// Prefer 64-bit arch if there is any
|
||||
if arch.ArchType.Multilib == "lib64" {
|
||||
archForPrebuiltEtc = arch
|
||||
break
|
||||
}
|
||||
}
|
||||
ctx.AddFarVariationDependencies([]blueprint.Variation{
|
||||
{Mutator: "os", Variation: ctx.Os().String()},
|
||||
{Mutator: "arch", Variation: archForPrebuiltEtc.String()},
|
||||
}, prebuiltTag, a.properties.Prebuilts...)
|
||||
|
||||
ctx.AddFarVariationDependencies(ctx.Config().AndroidCommonTarget.Variations(),
|
||||
javaLibTag, a.properties.Java_libs...)
|
||||
|
||||
|
|
Loading…
Reference in a new issue