Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bb2bac8 authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by android-build-merger
Browse files

For abi diffing, factor in arch variant and primary arch.

am: ac066c6b

Change-Id: Ifb7df61cee156e4578bf8af90b7d9263335c4448
parents f49ff892 ac066c6b
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -776,7 +776,12 @@ func pathForModule(ctx ModuleContext) OutputPath {
// PathForVndkRefDump returns an OptionalPath representing the path of the reference
// abi dump for the given module. This is not guaranteed to be valid.
func PathForVndkRefAbiDump(ctx ModuleContext, version, fileName string, vndkOrNdk, isSourceDump bool) OptionalPath {
	archName := ctx.Arch().ArchType.Name
	arches := ctx.DeviceConfig().Arches()
	currentArch := ctx.Arch()
	archNameAndVariant := currentArch.ArchType.String()
	if currentArch.ArchVariant != "" {
		archNameAndVariant += "_" + currentArch.ArchVariant
	}
	var sourceOrBinaryDir string
	var vndkOrNdkDir string
	var ext string
@@ -792,8 +797,12 @@ func PathForVndkRefAbiDump(ctx ModuleContext, version, fileName string, vndkOrNd
	} else {
		vndkOrNdkDir = "ndk"
	}
	refDumpFileStr := "prebuilts/abi-dumps/" + vndkOrNdkDir + "/" + version + "/" +
		archName + "/" + sourceOrBinaryDir + "/" + fileName + ext
	if len(arches) == 0 {
		panic("device build with no primary arch")
	}
	primary_arch := arches[0].ArchType.String()
	refDumpFileStr := "prebuilts/abi-dumps/" + vndkOrNdkDir + "/" + version + "/" + primary_arch + "/" +
		archNameAndVariant + "/" + sourceOrBinaryDir + "/" + fileName + ext
	return ExistentPathForSource(ctx, refDumpFileStr)
}