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 "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", 273 "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", 274 // Hide symbols by default and set the BUILDING_LIBBINDER macro so that 275 // the code knows to export them. 276 "-fvisibility=hidden", 277 "-DBUILDING_LIBBINDER", 278 ], 279 280 target: { 281 vendor: { 282 // Trimming the exported symbols reveals a bug in vendor code, so 283 // disable it for the vendor variant for now. http://b/349657329 284 // TODO: Fix the issue and remove this override. 285 cflags: ["-fvisibility=default"], 286 }, 287 }, 288} 289 290cc_defaults { 291 name: "libbinder_android_defaults", 292 293 // TODO(b/31559095): get headers from bionic on host 294 include_dirs: [ 295 "bionic/libc/kernel/android/uapi/", 296 "bionic/libc/kernel/uapi/", 297 ], 298 299 srcs: [ 300 "OS_android.cpp", 301 "OS_unix_base.cpp", 302 ], 303 304 target: { 305 host: { 306 srcs: [ 307 "UtilsHost.cpp", 308 ], 309 }, 310 android: { 311 lto: { 312 thin: true, 313 }, 314 }, 315 }, 316 317 aidl: { 318 export_aidl_headers: true, 319 }, 320 321 product_variables: { 322 debuggable: { 323 cflags: [ 324 "-DBINDER_RPC_DEV_SERVERS", 325 "-DBINDER_ENABLE_RECORDING", 326 ], 327 }, 328 }, 329 330 shared_libs: [ 331 "libcutils", 332 "liblog", 333 "libutils", 334 ], 335 336 static_libs: [ 337 "libbase", 338 ], 339 340 header_libs: [ 341 "jni_headers", 342 "libbinder_headers", 343 ], 344 345 export_header_lib_headers: [ 346 "libbinder_headers", 347 ], 348 349 sanitize: { 350 misc_undefined: ["integer"], 351 }, 352 353 tidy: true, 354 tidy_flags: [ 355 // Only check our headers 356 "--header-filter=^.*frameworks/native/libs/binder/.*.h$", 357 ], 358 tidy_checks: [ 359 "-performance-no-int-to-ptr", 360 ], 361 tidy_checks_as_errors: [ 362 // Explicitly list the checks that should not occur in this module. 363 "abseil-*", 364 "android-*", 365 "bugprone-*", 366 "-bugprone-branch-clone", // b/155034972 367 "cert-*", 368 "clang-analyzer-*", 369 "google-*", 370 "misc-*", 371 "performance*", 372 "-performance-move-const-arg", // b/273486801 373 "portability*", 374 ], 375} 376 377cc_library_headers { 378 name: "trusty_mock_headers", 379 host_supported: true, 380 vendor_available: true, 381 382 export_include_dirs: [ 383 "trusty/include", 384 "trusty/include_mock", 385 ], 386 387 visibility: [ 388 ":__subpackages__", 389 ], 390} 391 392cc_defaults { 393 name: "trusty_mock_defaults", 394 host_supported: true, 395 vendor_available: true, 396 397 header_libs: [ 398 "libbinder_headers_base", 399 "liblog_stub", 400 "trusty_mock_headers", 401 ], 402 export_header_lib_headers: [ 403 "libbinder_headers_base", 404 "liblog_stub", 405 "trusty_mock_headers", 406 ], 407 408 shared_libs: [ 409 "libutils_binder_sdk", 410 ], 411 412 cflags: [ 413 "-DBINDER_RPC_SINGLE_THREADED", 414 "-DBINDER_ENABLE_LIBLOG_ASSERT", 415 "-DBINDER_DISABLE_NATIVE_HANDLE", 416 "-DBINDER_DISABLE_BLOB", 417 "-DBINDER_NO_LIBBASE", 418 // TODO: switch to "vendor: true" rather than copying this 419 // Trusty libbinder uses vendor stability for its binders 420 "-D__ANDROID_VENDOR__", 421 "-D__ANDROID_VNDK__", 422 "-U__ANDROID__", 423 "-D__TRUSTY__", 424 "-DTRUSTY_USERSPACE", 425 // Flags from the Trusty build system 426 "-Werror", 427 "-Wsign-compare", 428 "-Wno-unused-function", 429 "-Wno-unused-label", 430 "-fno-common", 431 "-fno-omit-frame-pointer", 432 "-fno-threadsafe-statics", 433 ], 434 rtti: false, 435 436 visibility: [ 437 ":__subpackages__", 438 ], 439} 440 441cc_library_shared { 442 name: "libbinder_on_trusty_mock", 443 defaults: [ 444 "libbinder_common_defaults", 445 "trusty_mock_defaults", 446 ], 447 448 srcs: [ 449 // Trusty-specific files 450 "trusty/OS.cpp", 451 "trusty/RpcServerTrusty.cpp", 452 "trusty/RpcTransportTipcTrusty.cpp", 453 "trusty/TrustyStatus.cpp", 454 "trusty/socket.cpp", 455 ], 456} 457 458soong_config_module_type { 459 name: "libbinder_remove_cache_static_list_config", 460 module_type: "cc_defaults", 461 config_namespace: "libbinder", 462 bool_variables: ["release_libbinder_remove_cache_static_list"], 463 properties: [ 464 "cflags", 465 ], 466} 467 468libbinder_remove_cache_static_list_config { 469 name: "libbinder_remove_cache_static_list_flag", 470 soong_config_variables: { 471 release_libbinder_remove_cache_static_list: { 472 cflags: ["-DLIBBINDER_REMOVE_CACHE_STATIC_LIST"], 473 conditions_default: { 474 cflags: ["-DNO_LIBBINDER_REMOVE_CACHE_STATIC_LIST"], 475 }, 476 }, 477 }, 478} 479 480soong_config_module_type { 481 name: "libbinder_client_cache_config", 482 module_type: "cc_defaults", 483 config_namespace: "libbinder", 484 bool_variables: ["release_libbinder_client_cache"], 485 properties: [ 486 "cflags", 487 ], 488} 489 490libbinder_client_cache_config { 491 name: "libbinder_client_cache_flag", 492 soong_config_variables: { 493 release_libbinder_client_cache: { 494 cflags: ["-DLIBBINDER_CLIENT_CACHE"], 495 conditions_default: { 496 cflags: ["-DNO_LIBBINDER_CLIENT_CACHE"], 497 }, 498 }, 499 }, 500} 501 502soong_config_module_type { 503 name: "libbinder_addservice_cache_config", 504 module_type: "cc_defaults", 505 config_namespace: "libbinder", 506 bool_variables: ["release_libbinder_addservice_cache"], 507 properties: [ 508 "cflags", 509 ], 510} 511 512libbinder_addservice_cache_config { 513 name: "libbinder_addservice_cache_flag", 514 soong_config_variables: { 515 release_libbinder_addservice_cache: { 516 cflags: ["-DLIBBINDER_ADDSERVICE_CACHE"], 517 conditions_default: { 518 cflags: ["-DNO_LIBBINDER_ADDSERVICE_CACHE"], 519 }, 520 }, 521 }, 522} 523 524cc_defaults { 525 name: "libbinder_kernel_defaults", 526 defaults: [ 527 "libbinder_client_cache_flag", 528 "libbinder_addservice_cache_flag", 529 "libbinder_remove_cache_static_list_flag", 530 ], 531 srcs: [ 532 "BufferedTextOutput.cpp", 533 "BackendUnifiedServiceManager.cpp", 534 "IPCThreadState.cpp", 535 "IServiceManager.cpp", 536 "IServiceManagerFFI.cpp", 537 "ProcessState.cpp", 538 "Static.cpp", 539 ":libbinder_aidl", 540 ":libbinder_accessor_aidl", 541 ":libbinder_device_interface_sources", 542 ], 543 target: { 544 vendor: { 545 exclude_srcs: [ 546 ":libbinder_device_interface_sources", 547 ], 548 }, 549 host: { 550 srcs: [ 551 "ServiceManagerHost.cpp", 552 ], 553 }, 554 android: { 555 shared_libs: [ 556 "libapexsupport", 557 "libvndksupport", 558 ], 559 }, 560 recovery: { 561 exclude_shared_libs: [ 562 "libapexsupport", 563 "libvndksupport", 564 ], 565 }, 566 native_bridge: { 567 exclude_shared_libs: [ 568 "libapexsupport", 569 "libvndksupport", 570 ], 571 }, 572 }, 573 cflags: [ 574 "-DBINDER_WITH_KERNEL_IPC", 575 ], 576} 577 578cc_library { 579 name: "libbinder", 580 defaults: [ 581 "libbinder_common_defaults", 582 "libbinder_android_defaults", 583 "libbinder_kernel_defaults", 584 ], 585 586 version_script: "libbinder.map", 587 588 // for vndbinder 589 vendor_available: true, 590 recovery_available: true, 591 double_loadable: true, 592 // TODO(b/153609531): remove when no longer needed. 593 native_bridge_supported: true, 594 cmake_snapshot_supported: false, 595 596 // libbinder does not offer a stable wire protocol. 597 // if a second copy of it is installed, then it may break after security 598 // or dessert updates. Instead, apex users should use libbinder_ndk. 599 apex_available: [ 600 "//apex_available:platform", 601 ], 602 603 srcs: [ 604 "IMemory.cpp", 605 "IShellCallback.cpp", 606 "LazyServiceRegistrar.cpp", 607 "MemoryBase.cpp", 608 "MemoryDealer.cpp", 609 "MemoryHeapBase.cpp", 610 "ParcelableHolder.cpp", 611 "PersistableBundle.cpp", 612 ], 613 target: { 614 android: { 615 // NOT static to keep the wire protocol unfrozen 616 static: { 617 enabled: false, 618 }, 619 }, 620 darwin: { 621 enabled: false, 622 }, 623 recovery: { 624 exclude_header_libs: [ 625 "jni_headers", 626 ], 627 }, 628 }, 629 630 afdo: true, 631} 632 633cc_defaults { 634 name: "binder_sdk_defaults", 635 636 cflags: [ 637 "-DBINDER_ENABLE_LIBLOG_ASSERT", 638 "-DBINDER_DISABLE_NATIVE_HANDLE", 639 "-DBINDER_DISABLE_BLOB", 640 "-DBINDER_NO_LIBBASE", 641 ], 642 643 header_libs: [ 644 "liblog_stub", 645 ], 646} 647 648cc_defaults { 649 name: "libbinder_sdk_defaults", 650 651 cmake_snapshot_supported: true, 652 653 defaults: [ 654 "libbinder_common_defaults", 655 "binder_sdk_defaults", 656 ], 657 658 shared_libs: [ 659 "libutils_binder_sdk", 660 ], 661 662 srcs: [ 663 "OS_non_android_linux.cpp", 664 "OS_unix_base.cpp", 665 ], 666 667 visibility: [ 668 ":__subpackages__", 669 ], 670 671 target: { 672 windows: { 673 enabled: false, 674 }, 675 }, 676} 677 678cc_library_host_shared { 679 name: "libbinder_sdk", 680 defaults: ["libbinder_sdk_defaults"], 681} 682 683cc_library_host_shared { 684 name: "libbinder_sdk_single_threaded", 685 defaults: ["libbinder_sdk_defaults"], 686 cflags: [ 687 "-DBINDER_RPC_SINGLE_THREADED", 688 ], 689} 690 691cc_library { 692 name: "libbinder_rpc_no_kernel", 693 vendor_available: true, 694 defaults: [ 695 "libbinder_common_defaults", 696 "libbinder_android_defaults", 697 ], 698 visibility: [ 699 ":__subpackages__", 700 ], 701} 702 703cc_library { 704 name: "libbinder_rpc_no_blob", 705 vendor_available: true, 706 defaults: [ 707 "libbinder_common_defaults", 708 "libbinder_android_defaults", 709 "libbinder_kernel_defaults", 710 ], 711 cflags: [ 712 "-DBINDER_DISABLE_BLOB", 713 ], 714 visibility: [ 715 ":__subpackages__", 716 ], 717} 718 719cc_library { 720 name: "libbinder_rpc_no_native_handle", 721 vendor_available: true, 722 defaults: [ 723 "libbinder_common_defaults", 724 "libbinder_android_defaults", 725 "libbinder_kernel_defaults", 726 ], 727 cflags: [ 728 "-DBINDER_DISABLE_NATIVE_HANDLE", 729 ], 730 visibility: [ 731 ":__subpackages__", 732 ], 733} 734 735cc_library { 736 name: "libbinder_rpc_single_threaded", 737 defaults: [ 738 "libbinder_common_defaults", 739 "libbinder_android_defaults", 740 "libbinder_kernel_defaults", 741 ], 742 cflags: [ 743 "-DBINDER_RPC_SINGLE_THREADED", 744 ], 745 visibility: [ 746 ":__subpackages__", 747 ], 748} 749 750cc_library { 751 name: "libbinder_rpc_single_threaded_no_kernel", 752 defaults: [ 753 "libbinder_common_defaults", 754 "libbinder_android_defaults", 755 ], 756 cflags: [ 757 "-DBINDER_RPC_SINGLE_THREADED", 758 ], 759 visibility: [ 760 ":__subpackages__", 761 ], 762} 763 764cc_defaults { 765 name: "libbinder_tls_shared_deps", 766 shared_libs: [ 767 "libbinder", 768 "libcrypto", 769 "liblog", 770 "libssl", 771 "libutils", 772 ], 773} 774 775cc_defaults { 776 name: "libbinder_tls_defaults", 777 defaults: ["libbinder_tls_shared_deps"], 778 vendor_available: true, 779 host_supported: true, 780 cmake_snapshot_supported: true, 781 782 header_libs: [ 783 "libbinder_headers", 784 ], 785 export_header_lib_headers: [ 786 "libbinder_headers", 787 ], 788 export_shared_lib_headers: [ 789 "libssl", 790 ], 791 export_include_dirs: ["include_tls"], 792 static_libs: [ 793 "libbase", 794 ], 795 srcs: [ 796 "RpcTransportTls.cpp", 797 "RpcTlsUtils.cpp", 798 ], 799} 800 801cc_library_shared { 802 name: "libbinder_tls", 803 defaults: ["libbinder_tls_defaults"], 804} 805 806cc_library { 807 name: "libbinder_trusty", 808 vendor: true, 809 srcs: [ 810 "RpcTransportTipcAndroid.cpp", 811 "RpcTrusty.cpp", 812 ], 813 814 shared_libs: [ 815 "libbinder", 816 "liblog", 817 "libtrusty", 818 "libutils", 819 ], 820 static_libs: [ 821 "libbase", 822 ], 823 export_include_dirs: ["include_trusty"], 824 825 // Most of Android doesn't need this library and shouldn't use it, 826 // so we restrict its visibility to the Trusty-specific packages. 827 visibility: [ 828 ":__subpackages__", 829 "//system/core/trusty:__subpackages__", 830 "//vendor:__subpackages__", 831 ], 832} 833 834// For testing 835cc_library_static { 836 name: "libbinder_tls_static", 837 defaults: ["libbinder_tls_defaults"], 838 visibility: [ 839 ":__subpackages__", 840 ], 841} 842 843// AIDL interface between libbinder and framework.jar 844filegroup { 845 name: "libbinder_aidl", 846 srcs: [ 847 "aidl/android/os/ConnectionInfo.aidl", 848 "aidl/android/os/IClientCallback.aidl", 849 "aidl/android/os/IServiceCallback.aidl", 850 "aidl/android/os/IServiceManager.aidl", 851 "aidl/android/os/Service.aidl", 852 "aidl/android/os/ServiceWithMetadata.aidl", 853 "aidl/android/os/ServiceDebugInfo.aidl", 854 ], 855 path: "aidl", 856} 857 858filegroup { 859 name: "libbinder_accessor_aidl", 860 srcs: [ 861 "aidl/android/os/IAccessor.aidl", 862 ], 863 path: "aidl", 864 visibility: [":__subpackages__"], 865} 866 867aidl_interface { 868 name: "packagemanager_aidl", 869 unstable: true, 870 local_include_dir: "aidl", 871 host_supported: true, 872 srcs: [ 873 "aidl/android/content/pm/IPackageManagerNative.aidl", 874 "aidl/android/content/pm/IStagedApexObserver.aidl", 875 "aidl/android/content/pm/ApexStagedEvent.aidl", 876 "aidl/android/content/pm/StagedApexInfo.aidl", 877 ], 878 backend: { 879 rust: { 880 apex_available: [ 881 "//apex_available:platform", 882 "com.android.virt", 883 ], 884 enabled: true, 885 }, 886 }, 887} 888 889aidl_interface { 890 name: "libbinder_aidl_test_stub", 891 unstable: true, 892 local_include_dir: "aidl", 893 srcs: [":libbinder_aidl"], 894 vendor_available: true, 895 backend: { 896 java: { 897 enabled: false, 898 }, 899 }, 900 visibility: [ 901 ":__subpackages__", 902 "//system/tools/aidl:__subpackages__", 903 ], 904} 905 906// TODO(b/184872979): remove once the Rust API is created. 907cc_library { 908 name: "libbinder_rpc_unstable", 909 srcs: ["libbinder_rpc_unstable.cpp"], 910 shared_libs: [ 911 "libbase", 912 "libbinder", 913 "libbinder_ndk", 914 "liblog", 915 "libutils", 916 ], 917 export_include_dirs: ["include_rpc_unstable"], 918 919 // enumerate stable entry points, for apex use 920 stubs: { 921 symbol_file: "libbinder_rpc_unstable.map.txt", 922 }, 923 924 header_abi_checker: { 925 enabled: false, 926 }, 927 928 // This library is intentionally limited to these targets, and it will be removed later. 929 // Do not expand the visibility. 930 visibility: [ 931 ":__subpackages__", 932 "//packages/modules/Virtualization:__subpackages__", 933 "//device/google/cuttlefish/shared/minidroid:__subpackages__", 934 "//visibility:any_system_partition", 935 ], 936} 937 938// libbinder historically contained additional interfaces that provided specific 939// functionality in the platform but have nothing to do with binder itself. These 940// are moved out of libbinder in order to avoid the overhead of their vtables. 941// If you are working on or own one of these interfaces, the responsible things 942// to would be: 943// - give them a new home 944// - convert them to AIDL instead of having manually written parceling code 945 946cc_library { 947 name: "libbatterystats_aidl", 948 host_supported: true, 949 srcs: [ 950 "IBatteryStats.cpp", 951 ], 952 export_include_dirs: ["include_batterystats"], 953 shared_libs: [ 954 "libbinder", 955 "libutils", 956 ], 957} 958 959cc_library { 960 name: "libprocessinfoservice_aidl", 961 host_supported: true, 962 srcs: [ 963 "IProcessInfoService.cpp", 964 "ProcessInfoService.cpp", 965 ], 966 export_include_dirs: ["include_processinfo"], 967 shared_libs: [ 968 "libbinder", 969 "libutils", 970 "liblog", 971 ], 972} 973 974cc_library { 975 name: "libactivitymanager_aidl", 976 srcs: [ 977 "ActivityManager.cpp", 978 "IActivityManager.cpp", 979 "IUidObserver.cpp", 980 ":activity_manager_procstate_aidl", 981 ], 982 export_include_dirs: ["include_activitymanager"], 983 shared_libs: [ 984 "libbinder", 985 "libutils", 986 "liblog", 987 ], 988 aidl: { 989 export_aidl_headers: true, 990 }, 991} 992 993cc_binary { 994 name: "servicedispatcher", 995 host_supported: false, 996 srcs: [ 997 "servicedispatcher.cpp", 998 ], 999 shared_libs: [ 1000 "libbase", 1001 "libbinder", 1002 "liblog", 1003 "libutils", 1004 "android.debug_aidl-cpp", 1005 ], 1006} 1007