• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2009 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_native_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_native_license"],
22    default_team: "trendy_team_virtualization",
23}
24
25cc_library_headers {
26    name: "libbinder_headers_base",
27    export_include_dirs: ["include"],
28    vendor_available: true,
29    recovery_available: true,
30    host_supported: true,
31    native_bridge_supported: true,
32    cmake_snapshot_supported: true,
33
34    header_libs: [
35        "libbinder_headers_platform_shared",
36    ],
37    export_header_lib_headers: [
38        "libbinder_headers_platform_shared",
39    ],
40    apex_available: [
41        "//apex_available:platform",
42        "com.android.media",
43        "com.android.media.swcodec",
44    ],
45    min_sdk_version: "29",
46    target: {
47        darwin: {
48            enabled: false,
49        },
50    },
51    visibility: [
52        ":__subpackages__",
53    ],
54}
55
56cc_library_headers {
57    name: "libbinder_headers",
58    vendor_available: true,
59    recovery_available: true,
60    host_supported: true,
61    native_bridge_supported: true,
62
63    header_libs: [
64        "libbase_headers",
65        "libbinder_headers_base",
66        "libcutils_headers",
67        "libutils_headers",
68    ],
69    export_header_lib_headers: [
70        "libbase_headers",
71        "libbinder_headers_base",
72        "libcutils_headers",
73        "libutils_headers",
74    ],
75    apex_available: [
76        "//apex_available:platform",
77        "com.android.media",
78        "com.android.media.swcodec",
79    ],
80    min_sdk_version: "29",
81    target: {
82        darwin: {
83            enabled: false,
84        },
85    },
86}
87
88cc_cmake_snapshot {
89    name: "binder_sdk",
90    dist: {
91        targets: ["binder_sdk"],
92        dest: "binder_sdk.zip",
93    },
94
95    modules_host: [
96        "libbinder_sdk",
97        "libbinder_sdk_single_threaded",
98        "libbinder_ndk_sdk",
99        "googletest_cmake",
100
101        "binderRpcTestNoKernel",
102        "binderRpcTestSingleThreadedNoKernel",
103        "binderRpcWireProtocolTest",
104    ],
105    prebuilts: [
106        // to enable arm64 host support, build with musl - e.g. on aosp_cf_arm64_phone
107        "aidl",
108    ],
109    include_sources: true,
110    cflags: [
111        "-DNDEBUG",
112        "-DBINDER_ENABLE_LIBLOG_ASSERT",
113        "-DBINDER_DISABLE_NATIVE_HANDLE",
114        "-DBINDER_DISABLE_BLOB",
115        "-DBINDER_NO_LIBBASE",
116        "-DBINDER_NO_KERNEL_IPC_TESTING",
117
118        // from Soong's global.go commonGlobalCflags and noOverrideGlobalCflags
119        "-Wno-c99-designator",
120        "-Wno-missing-field-initializers",
121
122        // warnings that only pop up on gcc
123        "-Wno-unknown-pragmas", // "pragma clang"
124        "-Wno-attributes", // attributes on compound-statements
125        "-Wno-psabi", // reminders about old ABI changes
126    ],
127    cflags_ignored: [
128        // gcc requires all header constexprs to be used in all dependent compilatinon units
129        "-Wunused-const-variable",
130    ],
131    library_mapping: [
132        {
133            android_name: "libssl",
134            mapped_name: "ssl",
135            package_pregenerated: "external/boringssl",
136        },
137        {
138            android_name: "libcrypto",
139            mapped_name: "crypto",
140            package_pregenerated: "external/boringssl",
141        },
142        {
143            android_name: "libgtest",
144            mapped_name: "GTest::gtest",
145            package_pregenerated: "external/googletest",
146        },
147        {
148            android_name: "libgtest_main",
149            mapped_name: "GTest::gtest_main",
150            package_pregenerated: "external/googletest",
151        },
152        {
153            android_name: "googletest_cmake",
154            package_pregenerated: "external/googletest",
155        },
156
157        // use libbinder_sdk and friends instead of full Android's libbinder
158        {
159            android_name: "libbinder_rpc_no_kernel",
160            mapped_name: "android::libbinder_sdk",
161        },
162        {
163            android_name: "libbinder_rpc_single_threaded_no_kernel",
164            mapped_name: "android::libbinder_sdk_single_threaded",
165        },
166        {
167            android_name: "libbinder_headers",
168            mapped_name: "android::libbinder_headers_base",
169        },
170        {
171            android_name: "libbinder",
172            mapped_name: "android::libbinder_sdk",
173        },
174        {
175            android_name: "libbinder_ndk",
176            mapped_name: "android::libbinder_ndk_sdk",
177        },
178        {
179            android_name: "liblog",
180            mapped_name: "android::liblog_stub",
181        },
182
183        // explicitly included by Binder tests, but not needed outside of Android
184        {
185            android_name: "libbase",
186        },
187        {
188            android_name: "libcutils",
189        },
190        {
191            android_name: "libutils",
192        },
193
194        // disable tests that don't work outside of Android yet
195        {
196            android_name: "binder_rpc_test_service",
197        },
198        {
199            android_name: "binder_rpc_test_service_single_threaded",
200        },
201
202        // trusty mocks are artificially triggered and not needed outside of Android build
203        {
204            android_name: "libbinder_on_trusty_mock",
205        },
206        {
207            android_name: "libbinder_ndk_on_trusty_mock",
208        },
209        {
210            android_name: "binderRpcTestService_on_trusty_mock",
211        },
212        {
213            android_name: "binderRpcTest_on_trusty_mock",
214        },
215    ],
216}
217
218// These interfaces are android-specific implementation unrelated to binder
219// transport itself and should be moved to AIDL or in domain-specific libs.
220//
221// Currently, these are only on system android (not vendor, not host)
222// TODO(b/183654927) - move these into separate libraries
223
224filegroup {
225    name: "libbinder_device_interface_sources",
226    srcs: [
227        "IPermissionController.cpp",
228        "PermissionCache.cpp",
229        "PermissionController.cpp",
230    ],
231}
232
233cc_defaults {
234    name: "libbinder_common_defaults",
235    host_supported: true,
236
237    srcs: [
238        "Binder.cpp",
239        "BpBinder.cpp",
240        "Debug.cpp",
241        "FdTrigger.cpp",
242        "IInterface.cpp",
243        "IResultReceiver.cpp",
244        "Parcel.cpp",
245        "ParcelFileDescriptor.cpp",
246        "RecordedTransaction.cpp",
247        "RpcSession.cpp",
248        "RpcServer.cpp",
249        "RpcState.cpp",
250        "RpcTransportRaw.cpp",
251        "Stability.cpp",
252        "Status.cpp",
253        "TextOutput.cpp",
254        "Utils.cpp",
255        "file.cpp",
256    ],
257
258    header_libs: [
259        "libbinder_headers_base",
260    ],
261    export_header_lib_headers: [
262        "libbinder_headers_base",
263    ],
264
265    cflags: [
266        "-Wextra",
267        "-Wextra-semi",
268        "-Werror",
269        "-Wzero-as-null-pointer-constant",
270        "-Wreorder-init-list",
271        "-Wunused-const-variable",
272        "-Wunused-result",
273        "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
274        "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
275        // Hide symbols by default and set the BUILDING_LIBBINDER macro so that
276        // the code knows to export them.
277        "-fvisibility=hidden",
278        "-DBUILDING_LIBBINDER",
279    ],
280}
281
282cc_defaults {
283    name: "libbinder_android_defaults",
284
285    // TODO(b/31559095): get headers from bionic on host
286    include_dirs: [
287        "bionic/libc/kernel/android/uapi/",
288        "bionic/libc/kernel/uapi/",
289    ],
290
291    srcs: [
292        "OS_android.cpp",
293        "OS_unix_base.cpp",
294    ],
295
296    target: {
297        host: {
298            srcs: [
299                "UtilsHost.cpp",
300            ],
301        },
302        android: {
303            lto: {
304                thin: true,
305            },
306        },
307    },
308
309    aidl: {
310        export_aidl_headers: true,
311    },
312
313    product_variables: {
314        debuggable: {
315            cflags: [
316                "-DBINDER_RPC_DEV_SERVERS",
317                "-DBINDER_ENABLE_RECORDING",
318            ],
319        },
320    },
321
322    shared_libs: [
323        "libcutils",
324        "liblog",
325        "libutils",
326    ],
327
328    static_libs: [
329        "libbase",
330    ],
331
332    header_libs: [
333        "jni_headers",
334        "libbinder_headers",
335    ],
336
337    export_header_lib_headers: [
338        "libbinder_headers",
339    ],
340
341    sanitize: {
342        misc_undefined: ["integer"],
343    },
344
345    tidy: true,
346    tidy_flags: [
347        // Only check our headers
348        "--header-filter=^.*frameworks/native/libs/binder/.*.h$",
349    ],
350    tidy_checks: [
351        "-performance-no-int-to-ptr",
352    ],
353    tidy_checks_as_errors: [
354        // Explicitly list the checks that should not occur in this module.
355        "abseil-*",
356        "android-*",
357        "bugprone-*",
358        "-bugprone-branch-clone", // b/155034972
359        "cert-*",
360        "clang-analyzer-*",
361        "google-*",
362        "misc-*",
363        "performance*",
364        "-performance-move-const-arg", // b/273486801
365        "portability*",
366    ],
367}
368
369cc_library_headers {
370    name: "trusty_mock_headers",
371    host_supported: true,
372    vendor_available: true,
373
374    export_include_dirs: [
375        "trusty/include",
376        "trusty/include_mock",
377    ],
378
379    visibility: [
380        ":__subpackages__",
381    ],
382}
383
384cc_defaults {
385    name: "trusty_mock_defaults",
386    host_supported: true,
387    vendor_available: true,
388
389    header_libs: [
390        "libbinder_headers_base",
391        "liblog_stub",
392        "trusty_mock_headers",
393    ],
394    export_header_lib_headers: [
395        "libbinder_headers_base",
396        "liblog_stub",
397        "trusty_mock_headers",
398    ],
399
400    shared_libs: [
401        "libutils_binder_sdk",
402    ],
403
404    cflags: [
405        "-DBINDER_RPC_SINGLE_THREADED",
406        "-DBINDER_ENABLE_LIBLOG_ASSERT",
407        "-DBINDER_DISABLE_NATIVE_HANDLE",
408        "-DBINDER_DISABLE_BLOB",
409        "-DBINDER_NO_LIBBASE",
410        // TODO: switch to "vendor: true" rather than copying this
411        // Trusty libbinder uses vendor stability for its binders
412        "-D__ANDROID_VENDOR__",
413        "-D__ANDROID_VNDK__",
414        "-U__ANDROID__",
415        "-D__TRUSTY__",
416        "-DTRUSTY_USERSPACE",
417        // Flags from the Trusty build system
418        "-Werror",
419        "-Wsign-compare",
420        "-Wno-unused-function",
421        "-Wno-unused-label",
422        "-fno-common",
423        "-fno-omit-frame-pointer",
424        "-fno-threadsafe-statics",
425    ],
426    rtti: false,
427
428    visibility: [
429        ":__subpackages__",
430    ],
431}
432
433cc_library_shared {
434    name: "libbinder_on_trusty_mock",
435    defaults: [
436        "libbinder_common_defaults",
437        "trusty_mock_defaults",
438    ],
439
440    srcs: [
441        // Trusty-specific files
442        "trusty/OS.cpp",
443        "trusty/RpcServerTrusty.cpp",
444        "trusty/RpcTransportTipcTrusty.cpp",
445        "trusty/TrustyStatus.cpp",
446        "trusty/socket.cpp",
447    ],
448}
449
450soong_config_module_type {
451    name: "libbinder_remove_cache_static_list_config",
452    module_type: "cc_defaults",
453    config_namespace: "libbinder",
454    bool_variables: ["release_libbinder_remove_cache_static_list"],
455    properties: [
456        "cflags",
457    ],
458}
459
460libbinder_remove_cache_static_list_config {
461    name: "libbinder_remove_cache_static_list_flag",
462    soong_config_variables: {
463        release_libbinder_remove_cache_static_list: {
464            cflags: ["-DLIBBINDER_REMOVE_CACHE_STATIC_LIST"],
465            conditions_default: {
466                cflags: ["-DNO_LIBBINDER_REMOVE_CACHE_STATIC_LIST"],
467            },
468        },
469    },
470}
471
472soong_config_module_type {
473    name: "libbinder_client_cache_config",
474    module_type: "cc_defaults",
475    config_namespace: "libbinder",
476    bool_variables: ["release_libbinder_client_cache"],
477    properties: [
478        "cflags",
479    ],
480}
481
482libbinder_client_cache_config {
483    name: "libbinder_client_cache_flag",
484    soong_config_variables: {
485        release_libbinder_client_cache: {
486            cflags: ["-DLIBBINDER_CLIENT_CACHE"],
487            conditions_default: {
488                cflags: ["-DNO_LIBBINDER_CLIENT_CACHE"],
489            },
490        },
491    },
492}
493
494soong_config_module_type {
495    name: "libbinder_addservice_cache_config",
496    module_type: "cc_defaults",
497    config_namespace: "libbinder",
498    bool_variables: ["release_libbinder_addservice_cache"],
499    properties: [
500        "cflags",
501    ],
502}
503
504libbinder_addservice_cache_config {
505    name: "libbinder_addservice_cache_flag",
506    soong_config_variables: {
507        release_libbinder_addservice_cache: {
508            cflags: ["-DLIBBINDER_ADDSERVICE_CACHE"],
509            conditions_default: {
510                cflags: ["-DNO_LIBBINDER_ADDSERVICE_CACHE"],
511            },
512        },
513    },
514}
515
516cc_defaults {
517    name: "libbinder_kernel_defaults",
518    defaults: [
519        "libbinder_client_cache_flag",
520        "libbinder_addservice_cache_flag",
521        "libbinder_remove_cache_static_list_flag",
522    ],
523    srcs: [
524        "BufferedTextOutput.cpp",
525        "BackendUnifiedServiceManager.cpp",
526        "IPCThreadState.cpp",
527        "IServiceManager.cpp",
528        "IServiceManagerFFI.cpp",
529        "ProcessState.cpp",
530        "Static.cpp",
531        ":libbinder_aidl",
532        ":libbinder_accessor_aidl",
533        ":libbinder_device_interface_sources",
534    ],
535    target: {
536        vendor: {
537            exclude_srcs: [
538                ":libbinder_device_interface_sources",
539            ],
540        },
541        host: {
542            srcs: [
543                "ServiceManagerHost.cpp",
544            ],
545        },
546        android: {
547            shared_libs: [
548                "libapexsupport",
549                "libvndksupport",
550            ],
551        },
552        recovery: {
553            exclude_shared_libs: [
554                "libapexsupport",
555                "libvndksupport",
556            ],
557        },
558        native_bridge: {
559            exclude_shared_libs: [
560                "libapexsupport",
561                "libvndksupport",
562            ],
563        },
564    },
565    cflags: [
566        "-DBINDER_WITH_KERNEL_IPC",
567    ],
568}
569
570cc_library {
571    name: "libbinder",
572    defaults: [
573        "libbinder_common_defaults",
574        "libbinder_android_defaults",
575        "libbinder_kernel_defaults",
576    ],
577
578    version_script: "libbinder.map",
579
580    // for vndbinder
581    vendor_available: true,
582    recovery_available: true,
583    double_loadable: true,
584    // TODO(b/153609531): remove when no longer needed.
585    native_bridge_supported: true,
586    cmake_snapshot_supported: false,
587
588    // libbinder does not offer a stable wire protocol.
589    // if a second copy of it is installed, then it may break after security
590    // or dessert updates. Instead, apex users should use libbinder_ndk.
591    apex_available: [
592        "//apex_available:platform",
593    ],
594
595    srcs: [
596        "IMemory.cpp",
597        "IShellCallback.cpp",
598        "LazyServiceRegistrar.cpp",
599        "MemoryBase.cpp",
600        "MemoryDealer.cpp",
601        "MemoryHeapBase.cpp",
602        "ParcelableHolder.cpp",
603        "PersistableBundle.cpp",
604    ],
605    target: {
606        android: {
607            // NOT static to keep the wire protocol unfrozen
608            static: {
609                enabled: false,
610            },
611        },
612        darwin: {
613            enabled: false,
614        },
615        recovery: {
616            exclude_header_libs: [
617                "jni_headers",
618            ],
619        },
620    },
621
622    afdo: true,
623}
624
625cc_defaults {
626    name: "binder_sdk_defaults",
627
628    cflags: [
629        "-DBINDER_ENABLE_LIBLOG_ASSERT",
630        "-DBINDER_DISABLE_NATIVE_HANDLE",
631        "-DBINDER_DISABLE_BLOB",
632        "-DBINDER_NO_LIBBASE",
633    ],
634
635    header_libs: [
636        "liblog_stub",
637    ],
638}
639
640cc_defaults {
641    name: "libbinder_sdk_defaults",
642
643    cmake_snapshot_supported: true,
644
645    defaults: [
646        "libbinder_common_defaults",
647        "binder_sdk_defaults",
648    ],
649
650    shared_libs: [
651        "libutils_binder_sdk",
652    ],
653
654    srcs: [
655        "OS_non_android_linux.cpp",
656        "OS_unix_base.cpp",
657    ],
658
659    visibility: [
660        ":__subpackages__",
661    ],
662
663    target: {
664        windows: {
665            enabled: false,
666        },
667    },
668}
669
670cc_library_host_shared {
671    name: "libbinder_sdk",
672    defaults: ["libbinder_sdk_defaults"],
673}
674
675cc_library_host_shared {
676    name: "libbinder_sdk_single_threaded",
677    defaults: ["libbinder_sdk_defaults"],
678    cflags: [
679        "-DBINDER_RPC_SINGLE_THREADED",
680    ],
681}
682
683cc_library {
684    name: "libbinder_rpc_no_kernel",
685    vendor_available: true,
686    defaults: [
687        "libbinder_common_defaults",
688        "libbinder_android_defaults",
689    ],
690    visibility: [
691        ":__subpackages__",
692    ],
693}
694
695cc_library {
696    name: "libbinder_rpc_no_blob",
697    vendor_available: true,
698    defaults: [
699        "libbinder_common_defaults",
700        "libbinder_android_defaults",
701        "libbinder_kernel_defaults",
702    ],
703    cflags: [
704        "-DBINDER_DISABLE_BLOB",
705    ],
706    visibility: [
707        ":__subpackages__",
708    ],
709}
710
711cc_library {
712    name: "libbinder_rpc_no_native_handle",
713    vendor_available: true,
714    defaults: [
715        "libbinder_common_defaults",
716        "libbinder_android_defaults",
717        "libbinder_kernel_defaults",
718    ],
719    cflags: [
720        "-DBINDER_DISABLE_NATIVE_HANDLE",
721    ],
722    visibility: [
723        ":__subpackages__",
724    ],
725}
726
727cc_library {
728    name: "libbinder_rpc_single_threaded",
729    defaults: [
730        "libbinder_common_defaults",
731        "libbinder_android_defaults",
732        "libbinder_kernel_defaults",
733    ],
734    cflags: [
735        "-DBINDER_RPC_SINGLE_THREADED",
736    ],
737    visibility: [
738        ":__subpackages__",
739    ],
740}
741
742cc_library {
743    name: "libbinder_rpc_single_threaded_no_kernel",
744    defaults: [
745        "libbinder_common_defaults",
746        "libbinder_android_defaults",
747    ],
748    cflags: [
749        "-DBINDER_RPC_SINGLE_THREADED",
750    ],
751    visibility: [
752        ":__subpackages__",
753    ],
754}
755
756cc_defaults {
757    name: "libbinder_tls_shared_deps",
758    shared_libs: [
759        "libbinder",
760        "libcrypto",
761        "liblog",
762        "libssl",
763        "libutils",
764    ],
765}
766
767cc_defaults {
768    name: "libbinder_tls_defaults",
769    defaults: ["libbinder_tls_shared_deps"],
770    vendor_available: true,
771    host_supported: true,
772    cmake_snapshot_supported: true,
773
774    header_libs: [
775        "libbinder_headers",
776    ],
777    export_header_lib_headers: [
778        "libbinder_headers",
779    ],
780    export_shared_lib_headers: [
781        "libssl",
782    ],
783    export_include_dirs: ["include_tls"],
784    static_libs: [
785        "libbase",
786    ],
787    srcs: [
788        "RpcTransportTls.cpp",
789        "RpcTlsUtils.cpp",
790    ],
791}
792
793cc_library_shared {
794    name: "libbinder_tls",
795    defaults: ["libbinder_tls_defaults"],
796}
797
798cc_library {
799    name: "libbinder_trusty",
800    vendor: true,
801    srcs: [
802        "RpcTransportTipcAndroid.cpp",
803        "RpcTrusty.cpp",
804    ],
805
806    shared_libs: [
807        "libbinder",
808        "liblog",
809        "libtrusty",
810        "libutils",
811    ],
812    static_libs: [
813        "libbase",
814    ],
815    export_include_dirs: ["include_trusty"],
816
817    // Most of Android doesn't need this library and shouldn't use it,
818    // so we restrict its visibility to the Trusty-specific packages.
819    visibility: [
820        ":__subpackages__",
821        "//hardware/interfaces/security/see:__subpackages__",
822        "//system/core/trusty:__subpackages__",
823        "//vendor:__subpackages__",
824    ],
825}
826
827// For testing
828cc_library_static {
829    name: "libbinder_tls_static",
830    defaults: ["libbinder_tls_defaults"],
831    visibility: [
832        ":__subpackages__",
833    ],
834}
835
836// AIDL interface between libbinder and framework.jar
837filegroup {
838    name: "libbinder_aidl",
839    srcs: [
840        "aidl/android/os/ConnectionInfo.aidl",
841        "aidl/android/os/IClientCallback.aidl",
842        "aidl/android/os/IServiceCallback.aidl",
843        "aidl/android/os/IServiceManager.aidl",
844        "aidl/android/os/Service.aidl",
845        "aidl/android/os/ServiceWithMetadata.aidl",
846        "aidl/android/os/ServiceDebugInfo.aidl",
847    ],
848    path: "aidl",
849}
850
851filegroup {
852    name: "libbinder_accessor_aidl",
853    srcs: [
854        "aidl/android/os/IAccessor.aidl",
855    ],
856    path: "aidl",
857    visibility: [":__subpackages__"],
858}
859
860aidl_interface {
861    name: "packagemanager_aidl",
862    unstable: true,
863    local_include_dir: "aidl",
864    host_supported: true,
865    srcs: [
866        "aidl/android/content/pm/IPackageManagerNative.aidl",
867        "aidl/android/content/pm/IStagedApexObserver.aidl",
868        "aidl/android/content/pm/ApexStagedEvent.aidl",
869        "aidl/android/content/pm/StagedApexInfo.aidl",
870    ],
871    backend: {
872        rust: {
873            apex_available: [
874                "//apex_available:platform",
875                "com.android.virt",
876            ],
877            enabled: true,
878        },
879    },
880}
881
882aidl_interface {
883    name: "libbinder_aidl_test_stub",
884    unstable: true,
885    local_include_dir: "aidl",
886    srcs: [":libbinder_aidl"],
887    vendor_available: true,
888    backend: {
889        java: {
890            enabled: false,
891        },
892    },
893    visibility: [
894        ":__subpackages__",
895        "//system/tools/aidl:__subpackages__",
896    ],
897}
898
899// TODO(b/184872979): remove once the Rust API is created.
900cc_library {
901    name: "libbinder_rpc_unstable",
902    srcs: ["libbinder_rpc_unstable.cpp"],
903    shared_libs: [
904        "libbase",
905        "libbinder",
906        "libbinder_ndk",
907        "liblog",
908        "libutils",
909    ],
910    export_include_dirs: ["include_rpc_unstable"],
911
912    // enumerate stable entry points, for apex use
913    stubs: {
914        symbol_file: "libbinder_rpc_unstable.map.txt",
915    },
916
917    header_abi_checker: {
918        enabled: false,
919    },
920
921    // This library is intentionally limited to these targets, and it will be removed later.
922    // Do not expand the visibility.
923    visibility: [
924        ":__subpackages__",
925        "//packages/modules/Virtualization:__subpackages__",
926        "//device/google/cuttlefish/shared/minidroid:__subpackages__",
927        "//visibility:any_system_partition",
928    ],
929}
930
931// libbinder historically contained additional interfaces that provided specific
932// functionality in the platform but have nothing to do with binder itself. These
933// are moved out of libbinder in order to avoid the overhead of their vtables.
934// If you are working on or own one of these interfaces, the responsible things
935// to would be:
936// - give them a new home
937// - convert them to AIDL instead of having manually written parceling code
938
939cc_library {
940    name: "libbatterystats_aidl",
941    host_supported: true,
942    srcs: [
943        "IBatteryStats.cpp",
944    ],
945    export_include_dirs: ["include_batterystats"],
946    shared_libs: [
947        "libbinder",
948        "libutils",
949    ],
950}
951
952cc_library {
953    name: "libprocessinfoservice_aidl",
954    host_supported: true,
955    srcs: [
956        "IProcessInfoService.cpp",
957        "ProcessInfoService.cpp",
958    ],
959    export_include_dirs: ["include_processinfo"],
960    shared_libs: [
961        "libbinder",
962        "libutils",
963        "liblog",
964    ],
965}
966
967cc_library {
968    name: "libactivitymanager_aidl",
969    srcs: [
970        "ActivityManager.cpp",
971        "IActivityManager.cpp",
972        "IUidObserver.cpp",
973        ":activity_manager_procstate_aidl",
974    ],
975    export_include_dirs: ["include_activitymanager"],
976    shared_libs: [
977        "libbinder",
978        "libutils",
979        "liblog",
980    ],
981    aidl: {
982        export_aidl_headers: true,
983    },
984}
985
986cc_binary {
987    name: "servicedispatcher",
988    host_supported: false,
989    srcs: [
990        "servicedispatcher.cpp",
991    ],
992    shared_libs: [
993        "libbase",
994        "libbinder",
995        "liblog",
996        "libutils",
997        "android.debug_aidl-cpp",
998    ],
999}
1000