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

Commit d2079b64 authored by Hsin-Yi Chen's avatar Hsin-Yi Chen
Browse files

Enable ABI diff between the source code and the previous version

This commit removes "-advice-only from" the command of cross-version ABI
diff. The ABI changes that are incompatible with the previous version
are propagated as build errors. The developers need to follow the
error message to resolve the ABI difference.

Test: make
Bug: 244520027
Change-Id: Ic6e7757d2b35b619afcc8f50c892d1cfe989c800
parent ab17626b
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -946,12 +946,8 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
	}

	var errorMessage string
	// When error occurs in previous version ABI diff, Developers can't just update ABI
	// reference but need to follow instructions to ensure ABI backward compatibility.
	if previousVersionDiff {
		// TODO(b/241496591): Remove -advice-only after b/239792343 and b/239790286 are reolved.
		extraFlags = append(extraFlags, "-advice-only")
		errorMessage = "error: Please follow development/vndk/tools/header-checker/README.md to ensure the ABI compatibility between your source code and version " + strconv.Itoa(prevVersion) + "."
		errorMessage = "error: Please follow https://android.googlesource.com/platform/development/+/master/vndk/tools/header-checker/README.md#configure-cross_version-abi-check to resolve the ABI difference between your source code and version " + strconv.Itoa(prevVersion) + "."
		sourceVersion := prevVersion + 1
		extraFlags = append(extraFlags, "-target-version", strconv.Itoa(sourceVersion))
	} else {