Ignore native bridge archs for apex selection
This leads to an arm64 apex being used on a device that is mixed x86_64 with nativebridge=arm64. A device like that doesn't appear to work with arm64 binaries. For example, the boringssl-self-check binary crashes on boot. Bug: 260115309 Test: unit test Test: boot emulator with this combination Change-Id: Ic4a91974290a05b1799f755fcf52ef226d68f4c2
This commit is contained in:
@@ -98,7 +98,7 @@ var TargetCpuAbi = map[string]string{
|
||||
"x86_64": "X86_64",
|
||||
}
|
||||
|
||||
func SupportedAbis(ctx android.ModuleContext) []string {
|
||||
func SupportedAbis(ctx android.ModuleContext, excludeNativeBridgeAbis bool) []string {
|
||||
abiName := func(targetIdx int, deviceArch string) string {
|
||||
if abi, found := TargetCpuAbi[deviceArch]; found {
|
||||
return abi
|
||||
@@ -109,6 +109,9 @@ func SupportedAbis(ctx android.ModuleContext) []string {
|
||||
|
||||
var result []string
|
||||
for i, target := range ctx.Config().Targets[android.Android] {
|
||||
if target.NativeBridge == android.NativeBridgeEnabled && excludeNativeBridgeAbis {
|
||||
continue
|
||||
}
|
||||
result = append(result, abiName(i, target.Arch.ArchType.String()))
|
||||
}
|
||||
return result
|
||||
@@ -135,7 +138,7 @@ func (as *AndroidAppSet) GenerateAndroidBuildActions(ctx android.ModuleContext)
|
||||
ImplicitOutputs: android.WritablePaths{as.packedOutput, as.apkcertsFile},
|
||||
Inputs: android.Paths{as.prebuilt.SingleSourcePath(ctx)},
|
||||
Args: map[string]string{
|
||||
"abis": strings.Join(SupportedAbis(ctx), ","),
|
||||
"abis": strings.Join(SupportedAbis(ctx, false), ","),
|
||||
"allow-prereleased": strconv.FormatBool(proptools.Bool(as.properties.Prerelease)),
|
||||
"screen-densities": screenDensities,
|
||||
"sdk-version": ctx.Config().PlatformSdkVersion().String(),
|
||||
|
Reference in New Issue
Block a user