diff options
author | 2022-08-18 23:26:00 +0000 | |
---|---|---|
committer | 2022-08-30 18:24:40 +0000 | |
commit | 73bcafcbb02d641ec912ac9277049eb91ad381e4 (patch) | |
tree | 1b7d4d672806a399dc66b8dee027c5870e25ea42 /cc/ndk_library.go | |
parent | f9f9ed7cf1718a7d520af8306b03b37c8226dd55 (diff) |
Add a property in ndk_library for header contributions
The new property will be used to determine the header file contributions of
ndk_library(s) to the Public API surface. This should be a no-op for
regular Soong builds.
This will be used by a future bp2build converter to populate
the BUILD files for Multi-tree `cc_api_contribution` targets
(Also noticed that sdk_test.go was never added to testSrcs, which this
CL should fix)
Test: go test ./cc
Test: TH
Change-Id: Ieea093e4aac68e341c6414b6cafe02c441643cdf
Diffstat (limited to 'cc/ndk_library.go')
-rw-r--r-- | cc/ndk_library.go | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/cc/ndk_library.go b/cc/ndk_library.go index 2bbfc4aee..e2b968296 100644 --- a/cc/ndk_library.go +++ b/cc/ndk_library.go @@ -84,11 +84,13 @@ var ( // // Example: // -// ndk_library { -// name: "libfoo", -// symbol_file: "libfoo.map.txt", -// first_version: "9", -// } +// ndk_library { +// +// name: "libfoo", +// symbol_file: "libfoo.map.txt", +// first_version: "9", +// +// } type libraryProperties struct { // Relative path to the symbol map. // An example file can be seen here: TODO(danalbert): Make an example. @@ -109,6 +111,9 @@ type libraryProperties struct { // where it is enabled pending a fix for http://b/190554910 (no debug info // for asm implemented symbols). Allow_untyped_symbols *bool + + // Headers presented by this library to the Public API Surface + Export_header_libs []string } type stubDecorator struct { @@ -483,8 +488,11 @@ func (c *stubDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) O return objs } +// Add a dependency on the header modules of this ndk_library func (linker *stubDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps { - return Deps{} + return Deps{ + HeaderLibs: linker.properties.Export_header_libs, + } } func (linker *stubDecorator) Name(name string) string { |