diff options
| author | 2019-10-01 15:58:07 -0700 | |
|---|---|---|
| committer | 2020-02-26 09:25:40 +0000 | |
| commit | 2a65dda27d49f1118a8386850969d97bbb529d87 (patch) | |
| tree | 94c720a7758ca46a88e5d22f5690900b70c4e9f3 /cc/library.go | |
| parent | 077f9a44f93b496d017e5c0f20c18c4bbc5ee3d0 (diff) | |
Add check_all_apis option for header ABI checker
This commit adds a header ABI checker option to check all APIs that can
be found. Without this option, the checker by default only checks the
class/struct/enum that are directly or indirectly referred by one of the
exported symbols. With `check_all_apis: true,`, the checker will check
all class/struct/enum.
Bug: 141709599
Test: Add `header_abi_checker: { check_all_apis: true, }` to a library
and see breakage if I change some enum.
Change-Id: I61f90e07b60a6752fc6be4398420c1ad1291102f
Diffstat (limited to 'cc/library.go')
| -rw-r--r-- | cc/library.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cc/library.go b/cc/library.go index 6ffb7fc1e..a5de54b4a 100644 --- a/cc/library.go +++ b/cc/library.go @@ -102,6 +102,10 @@ type LibraryProperties struct { // Symbol tags that should be ignored from the symbol file Exclude_symbol_tags []string + + // Run checks on all APIs (in addition to the ones referred by + // one of exported ELF symbols.) + Check_all_apis *bool } // Order symbols in .bss section by their sizes. Only useful for shared libraries. @@ -978,7 +982,9 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec refAbiDumpFile := getRefAbiDumpFile(ctx, vndkVersion, fileName) if refAbiDumpFile != nil { library.sAbiDiff = SourceAbiDiff(ctx, library.sAbiOutputFile.Path(), - refAbiDumpFile, fileName, exportedHeaderFlags, ctx.isLlndk(ctx.Config()), ctx.isNdk(), ctx.isVndkExt()) + refAbiDumpFile, fileName, exportedHeaderFlags, + Bool(library.Properties.Header_abi_checker.Check_all_apis), + ctx.isLlndk(ctx.Config()), ctx.isNdk(), ctx.isVndkExt()) } } } |