From d2079b646c6af24b3b7cc8a8665129f37a2d3362 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Chen Date: Mon, 24 Oct 2022 12:46:50 +0800 Subject: [PATCH] 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 --- cc/builder.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cc/builder.go b/cc/builder.go index 39f7dc350..75e473669 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -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 {