diff options
author | Logan Chien <loganchien@google.com> | 2019-01-17 00:18:02 +0800 |
---|---|---|
committer | Logan Chien <loganchien@google.com> | 2019-01-30 22:18:59 +0800 |
commit | e3d7a0d062c611f3410f3148bce265c5971fd67f (patch) | |
tree | 75d181864eedd40de11dba60645914c64f6cfe30 /cc/library.go | |
parent | e8cc556bf74b71236ae342bbf6be66cfed53ab49 (diff) | |
download | build_soong-e3d7a0d062c611f3410f3148bce265c5971fd67f.tar.gz build_soong-e3d7a0d062c611f3410f3148bce265c5971fd67f.tar.bz2 build_soong-e3d7a0d062c611f3410f3148bce265c5971fd67f.zip |
Add a header_abi_checker section
This commit adds a header_abi_checker section so that the library owner
can have a fine-grained control over the ABIs that must be checked.
For example, a library "libexample" may have following configurations:
cc_library {
name: "libexample",
header_abi_checker: {
symbol_file: "libexample.map.txt",
exclude_symbol_versions: ["LIBEXAMPLE_PRIVATE"],
exclude_symbol_tags: ["platform", "apex"],
},
}
Bug: 122845490
Test: Add header_abi_checker to libc to filter out LIBC_PRIVATE
Change-Id: I60cfea868f815afe6213c242ed0ca818161d55c6
Diffstat (limited to 'cc/library.go')
-rw-r--r-- | cc/library.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cc/library.go b/cc/library.go index ad07db47..138ba43b 100644 --- a/cc/library.go +++ b/cc/library.go @@ -87,6 +87,19 @@ type LibraryProperties struct { // binaries would be installed by default (in PRODUCT_PACKAGES) the other library will be removed // from PRODUCT_PACKAGES. Overrides []string + + // Properties for ABI compatibility checker + Header_abi_checker struct { + // Path to a symbol file that specifies the symbols to be included in the generated + // ABI dump file + Symbol_file *string + + // Symbol versions that should be ignored from the symbol file + Exclude_symbol_versions []string + + // Symbol tags that should be ignored from the symbol file + Exclude_symbol_tags []string + } } type LibraryMutatedProperties struct { @@ -760,7 +773,10 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec SourceAbiFlags = append(SourceAbiFlags, reexportedInclude) } exportedHeaderFlags := strings.Join(SourceAbiFlags, " ") - library.sAbiOutputFile = TransformDumpToLinkedDump(ctx, objs.sAbiDumpFiles, soFile, fileName, exportedHeaderFlags) + library.sAbiOutputFile = TransformDumpToLinkedDump(ctx, objs.sAbiDumpFiles, soFile, fileName, exportedHeaderFlags, + android.OptionalPathForModuleSrc(ctx, library.Properties.Header_abi_checker.Symbol_file), + library.Properties.Header_abi_checker.Exclude_symbol_versions, + library.Properties.Header_abi_checker.Exclude_symbol_tags) refAbiDumpFile := getRefAbiDumpFile(ctx, vndkVersion, fileName) if refAbiDumpFile != nil { |