Add header-abi-checker for Vndk abi checks.
header-abi-dumper: dumps abi exported by source files for Vndk. header-abi-linker: links abi dumps produced by header-abi-dumper. header-abi-diff: compares linked dumps. Test: mm -j64 showcommands > make_log in bionic/libc. This produced linked dumps in out/soong/.intermediates. Copied these dumps to prebuilts/abi-dumps/ndk/current/arm64/source-based/. Changed the abi and re-ran mm -j64 showcommands > make_log confirmed that the build reported compatibility breakge without actually failing (advisory mode). Change-Id: Iccad6908fe68a80f47230751671d156893b96ead
This commit is contained in:
@@ -576,6 +576,30 @@ type ModuleOutPath struct {
|
||||
|
||||
var _ Path = ModuleOutPath{}
|
||||
|
||||
// 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
|
||||
var sourceOrBinaryDir string
|
||||
var vndkOrNdkDir string
|
||||
var ext string
|
||||
if isSourceDump {
|
||||
ext = ".lsdump"
|
||||
sourceOrBinaryDir = "source-based"
|
||||
} else {
|
||||
ext = ".bdump"
|
||||
sourceOrBinaryDir = "binary-based"
|
||||
}
|
||||
if vndkOrNdk {
|
||||
vndkOrNdkDir = "vndk"
|
||||
} else {
|
||||
vndkOrNdkDir = "ndk"
|
||||
}
|
||||
refDumpFileStr := "prebuilts/abi-dumps/" + vndkOrNdkDir + "/" + version + "/" +
|
||||
archName + "/" + sourceOrBinaryDir + "/" + fileName + ext
|
||||
return OptionalPathForSource(ctx, "", refDumpFileStr)
|
||||
}
|
||||
|
||||
// PathForModuleOut returns a Path representing the paths... under the module's
|
||||
// output directory.
|
||||
func PathForModuleOut(ctx ModuleContext, paths ...string) ModuleOutPath {
|
||||
|
Reference in New Issue
Block a user