From ee68c43d4bedd32b20a365d867046a00f48325a8 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Chen Date: Wed, 9 Mar 2022 15:18:19 +0800 Subject: [PATCH] Check ABI regardless of arch variants The ABI reference dump directory names contained TARGET_ARCH_VARIANT or TARGET_2ND_ARCH_VARIANT. The builds with non-generic arch variant could not find the reference dumps for their arches. This commit renames the directories to and _ to ensure that all arch variants are checked. Bug: 213127415 Test: lunch aosp_cf_x86_64_phone-userdebug && make Change-Id: I7617f3ffc0e1bc423eea8c39e0f2b745276b4244 --- android/paths.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/android/paths.go b/android/paths.go index 05caebd18..e7829b961 100644 --- a/android/paths.go +++ b/android/paths.go @@ -1474,14 +1474,11 @@ func pathForModuleOut(ctx ModuleOutPathContext) OutputPath { func PathForVndkRefAbiDump(ctx ModuleInstallPathContext, version, fileName string, isNdk, isLlndkOrVndk, isGzip bool) OptionalPath { - arches := ctx.DeviceConfig().Arches() - if len(arches) == 0 { - panic("device build with no primary arch") - } - currentArch := ctx.Arch() - archNameAndVariant := currentArch.ArchType.String() - if currentArch.ArchVariant != "" { - archNameAndVariant += "_" + currentArch.ArchVariant + currentArchType := ctx.Arch().ArchType + primaryArchType := ctx.Config().DevicePrimaryArchType() + archName := currentArchType.String() + if currentArchType != primaryArchType { + archName += "_" + primaryArchType.String() } var dirName string @@ -1503,7 +1500,7 @@ func PathForVndkRefAbiDump(ctx ModuleInstallPathContext, version, fileName strin } return ExistentPathForSource(ctx, "prebuilts", "abi-dumps", dirName, - version, binderBitness, archNameAndVariant, "source-based", + version, binderBitness, archName, "source-based", fileName+ext) }