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

Commit 1286af54 authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by android-build-merger
Browse files

Merge "For llndk libraries add -consider-opaque-types-different to...

Merge "For llndk libraries add -consider-opaque-types-different to header-abi-diff invocation." am: 694b1c7c am: 280ee69f
am: 76f04fdb

Change-Id: Ia90d8a5444de695c94f4ee29d8419b60232d0805
parents 1c5ec586 76f04fdb
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -726,11 +726,14 @@ func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
	baseName, exportedHeaderFlags string, isVndkExt bool) android.OptionalPath {

	outputFile := android.PathForModuleOut(ctx, baseName+".abidiff")

	libName := strings.TrimSuffix(baseName, filepath.Ext(baseName))
	localAbiCheckAllowFlags := append([]string(nil), abiCheckAllowFlags...)
	if exportedHeaderFlags == "" {
		localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-advice-only")
	}
	if inList(libName, llndkLibraries) {
		localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-consider-opaque-types-different")
	}
	if isVndkExt {
		localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-allow-extensions")
	}
@@ -743,7 +746,7 @@ func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
		Implicit:    referenceDump,
		Args: map[string]string{
			"referenceDump": referenceDump.String(),
			"libName":       baseName[0:(len(baseName) - len(filepath.Ext(baseName)))],
			"libName":       libName,
			"arch":          ctx.Arch().ArchType.Name,
			"allowFlags":    strings.Join(localAbiCheckAllowFlags, " "),
		},