libbinder: Add binderRpcTestService for Trusty
Add Trusty code and build files for binderRpcTestService
so we can run the binderRpcTest tests on Android against
a Trusty service.
Bug: 230135749
Test: build Trusty
Test: mmm tests
Change-Id: Id4dbe453229c1f1b93da2811cec265c0e331edfe
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index 28369d6..ec4b66c 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -195,18 +195,25 @@
],
}
-cc_library_shared {
- name: "libbinder_on_trusty_mock",
- defaults: ["libbinder_common_defaults"],
+cc_library_headers {
+ name: "trusty_mock_headers",
+ host_supported: true,
- srcs: [
- // Trusty-specific files
- "trusty/logging.cpp",
- "trusty/OS.cpp",
- "trusty/RpcServerTrusty.cpp",
- "trusty/RpcTransportTipcTrusty.cpp",
- "trusty/TrustyStatus.cpp",
- "trusty/socket.cpp",
+ export_include_dirs: [
+ "trusty/include",
+ "trusty/include_mock",
+ ],
+
+ visibility: [
+ ":__subpackages__",
+ ],
+}
+
+cc_defaults {
+ name: "trusty_mock_defaults",
+
+ header_libs: [
+ "trusty_mock_headers",
],
cflags: [
@@ -227,16 +234,29 @@
],
rtti: false,
- local_include_dirs: [
- "trusty/include",
- "trusty/include_mock",
- ],
-
visibility: [
":__subpackages__",
],
}
+cc_library_shared {
+ name: "libbinder_on_trusty_mock",
+ defaults: [
+ "libbinder_common_defaults",
+ "trusty_mock_defaults",
+ ],
+
+ srcs: [
+ // Trusty-specific files
+ "trusty/logging.cpp",
+ "trusty/OS.cpp",
+ "trusty/RpcServerTrusty.cpp",
+ "trusty/RpcTransportTipcTrusty.cpp",
+ "trusty/TrustyStatus.cpp",
+ "trusty/socket.cpp",
+ ],
+}
+
cc_defaults {
name: "libbinder_kernel_defaults",
srcs: [