For abi diffing, factor in arch variant and primary arch. am: ac066c6b90

am: 1bb2bac825

Change-Id: Iaa18d9e58082ab2b78d4dadd4c73c5762f65a7b2
This commit is contained in:
Jayant Chowdhary 2018-03-02 01:54:57 +00:00 committed by android-build-merger
commit 4486c87ccb
1 changed files with 12 additions and 3 deletions

View File

@ -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)
}