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 <TARGET_ARCH> and <TARGET_2ND_ARCH>_<TARGET_ARCH> to
ensure that all arch variants are checked.

Bug: 213127415
Test: lunch aosp_cf_x86_64_phone-userdebug && make

Change-Id: I7617f3ffc0e1bc423eea8c39e0f2b745276b4244
diff --git a/android/paths.go b/android/paths.go
index 05caebd..e7829b9 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -1474,14 +1474,11 @@
 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 @@
 	}
 
 	return ExistentPathForSource(ctx, "prebuilts", "abi-dumps", dirName,
-		version, binderBitness, archNameAndVariant, "source-based",
+		version, binderBitness, archName, "source-based",
 		fileName+ext)
 }