Fix false compatibility return status on extension.

Also, don't diff unreferenced anonymous records.

Bug: 64267858
Bug: 72697345

Test: Extend libjpeg by adding an exported function, also add an unused struct;
      Without this change: build shows an 'error' message, but does not fail.
      With this change in prebuilts : build shows 'error' message and
      fails.

Test: tests/test.py passes.

Change-Id: Ief7ed90715a9c1a25736c10449833650c73d3db3
This commit is contained in:
Jayant Chowdhary
2018-03-29 15:18:23 -07:00
parent f8dd4029c1
commit 8be19f1718
2 changed files with 12 additions and 8 deletions

View File

@@ -183,15 +183,15 @@ int main(int argc, const char **argv) {
<< "******************************************************\n";
}
if ((allow_extensions &&
if (!advice_only && ((!allow_extensions &&
(status & abi_util::CompatibilityStatusIR::Extension)) ||
(allow_unreferenced_changes &&
(!allow_unreferenced_changes &&
(status & abi_util::CompatibilityStatusIR::UnreferencedChanges)) ||
(allow_unreferenced_elf_symbol_changes &&
(!allow_unreferenced_elf_symbol_changes &&
(status & abi_util::CompatibilityStatusIR::ElfIncompatible)) ||
advice_only) {
return abi_util::CompatibilityStatusIR::Compatible;
(status & abi_util::CompatibilityStatusIR::Incompatible))) {
return status;
}
return status;
return abi_util::CompatibilityStatusIR::Compatible;
}