summaryrefslogtreecommitdiff
path: root/cc
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-06 19:04:16 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-03-06 19:04:16 -0800
commit94b59ef67f713dc1ae7380d05e31aba1ea232ab9 (patch)
treedbf29d88f9958284c3796c60e3d20800e2291a5f /cc
parent8e55d84880e70098b6200adbfb22f6453ca4c54e (diff)
parent4001c291d82003e15e6c443fc781cfece35fa0a2 (diff)
Merge "llndk stub of libbinder_ndk reads systemapi annotation" into main am: 4001c291d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3527355 Change-Id: I6cb7f3cabc4c1794eca3c97caba74e313e5880ea Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'cc')
-rw-r--r--cc/library.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/cc/library.go b/cc/library.go
index 8a2b6bdbd..b248224bd 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -606,10 +606,22 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
panic(err)
}
+ llndkFlag := "--llndk"
+ if ctx.baseModuleName() == "libbinder_ndk" && ctx.inProduct() {
+ // This is a special case only for the libbinder_ndk. As the product partition is in the
+ // framework side along with system and system_ext partitions in Treble, libbinder_ndk
+ // provides different binder interfaces between product and vendor modules.
+ // In libbinder_ndk, 'llndk' annotation is for the vendor APIs; while 'systemapi'
+ // annotation is for the product APIs.
+ // Use '--systemapi' flag for building the llndk stub of product variant for the
+ // libbinder_ndk.
+ llndkFlag = "--systemapi"
+ }
+
// This is the vendor variant of an LLNDK library, build the LLNDK stubs.
nativeAbiResult := ParseNativeAbiDefinition(ctx,
String(library.Properties.Llndk.Symbol_file),
- nativeClampedApiLevel(ctx, version), "--llndk")
+ nativeClampedApiLevel(ctx, version), llndkFlag)
objs := CompileStubLibrary(ctx, flags, nativeAbiResult.StubSrc, sharedFlags)
if !Bool(library.Properties.Llndk.Unversioned) {
library.versionScriptPath = android.OptionalPathForPath(