Remove unneeded logic from sourceAbiDiff

- The script creating reference dumps does not need --llndk. It can
  determine the library types automatically.
- NDK passes the ABI checks with -consider-opaque-types-different.
- All libraries checked by the ABI tools have exported headers and don't
  need -advice-only.

Bug: 232891473
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      && make
Change-Id: Ia418022d6d0b46bfabefaa296fa81e80291fde32
diff --git a/cc/builder.go b/cc/builder.go
index 468452d..7df1e99 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -964,7 +964,6 @@
 
 	outputFile := android.PathForModuleOut(ctx, baseName+".abidiff")
 	libName := strings.TrimSuffix(baseName, filepath.Ext(baseName))
-	createReferenceDumpFlags := ""
 
 	var extraFlags []string
 	if checkAllApis {
@@ -975,18 +974,8 @@
 			"-allow-unreferenced-elf-symbol-changes")
 	}
 
-	if exportedHeaderFlags == "" {
-		extraFlags = append(extraFlags, "-advice-only")
-	}
-
 	if isLlndk || isNdk {
-		createReferenceDumpFlags = "--llndk"
-		if isLlndk {
-			// TODO(b/130324828): "-consider-opaque-types-different" should apply to
-			// both LLNDK and NDK shared libs. However, a known issue in header-abi-diff
-			// breaks libaaudio. Remove the if-guard after the issue is fixed.
-			extraFlags = append(extraFlags, "-consider-opaque-types-different")
-		}
+		extraFlags = append(extraFlags, "-consider-opaque-types-different")
 	}
 	if isVndkExt {
 		extraFlags = append(extraFlags, "-allow-extensions")
@@ -1005,7 +994,7 @@
 			"libName":                  libName,
 			"arch":                     ctx.Arch().ArchType.Name,
 			"extraFlags":               strings.Join(extraFlags, " "),
-			"createReferenceDumpFlags": createReferenceDumpFlags,
+			"createReferenceDumpFlags": "",
 		},
 	})
 	return android.OptionalPathForPath(outputFile)