For llndk libraries add -consider-opaque-types-different to header-abi-diff invocation.

Bug: 79576032

Test: Create abi reference for libmediandk; build libmediandk;
      header-abi-diff gets invoked with '-consider-opaque-types-different'

Change-Id: I132138e333cc944b54051243b44fa072af74aa83
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
diff --git a/cc/builder.go b/cc/builder.go
index bc3652e..51d3195 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -726,11 +726,14 @@
 	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 @@
 		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, " "),
 		},