summaryrefslogtreecommitdiff
path: root/cc/ndk_library.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-10-06 21:35:21 +0000
committer Spandan Das <spandandas@google.com> 2023-10-09 18:07:39 +0000
commit17a27f0c143bd3482ecbb0f516d7f117290b464d (patch)
treee41ba67b1294adf23f5c6d5fa696764fc5374534 /cc/ndk_library.go
parent69cf8a3221e8ced4f86d915bb4800a775a36c8ab (diff)
Replace ndk_libs.bzl with an attr in cc_stub_suite
(This CL is a cleanup, and should be a no-op) Currently we support three variations of cc api stubs. 1. publicapi stubs, i.e. ndk stubs (empty additional args to ndkstubgen) 2. module-libapi stubs that are also an ndk library (--systemapi --apex) 3. module-libapi stubs that are not an ndk library (--systemapi --apex --no-ndk) ndk_libs.bzl was used to differentiate between (2) and (3). This creates an additional layer of indirection - users will need to modify this external .bzl file if they would like to add a library to an ndk. Replace this with an explicit atttibute in cc_stub_suite macro for better UX. Test: go test ./bp2build Test: b test //build/bazel/rules/cc:cc_stub_library_tests (added in sibling CL) Bug: 299501496 Change-Id: Idd3579e8013bae7a1740534f90d2767df5bac1a5
Diffstat (limited to 'cc/ndk_library.go')
-rw-r--r--cc/ndk_library.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 49365598f..df775de3e 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -594,9 +594,10 @@ func ndkLibraryBp2build(ctx android.Bp2buildMutatorContext, c *Module) {
symbolFileLabel := android.BazelLabelForModuleSrcSingle(ctx, proptools.String(ndk.properties.Symbol_file))
attrs := &bazelCcStubSuiteAttributes{
// TODO - b/300504837 Add ndk headers
- Symbol_file: proptools.StringPtr(symbolFileLabel.Label),
- Soname: proptools.StringPtr(sourceLibraryName + ".so"),
- Api_surface: proptools.StringPtr(android.PublicApi.String()),
+ Symbol_file: proptools.StringPtr(symbolFileLabel.Label),
+ Soname: proptools.StringPtr(sourceLibraryName + ".so"),
+ Api_surface: proptools.StringPtr(android.PublicApi.String()),
+ Included_in_ndk: proptools.BoolPtr(true),
}
if sourceLibrary, exists := ctx.ModuleFromName(sourceLibraryName); exists {
// the source library might not exist in minimal/unbuildable branches like kernel-build-tools.