1// 2// Copyright (C) 2015 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["system_tools_aidl_license"], 19} 20 21// Added automatically by a large-scale-change 22// See: http://go/android-license-faq 23license { 24 name: "system_tools_aidl_license", 25 visibility: [":__subpackages__"], 26 license_kinds: [ 27 "SPDX-license-identifier-Apache-2.0", 28 ], 29 license_text: [ 30 "NOTICE", 31 ], 32} 33 34cc_defaults { 35 name: "aidl_defaults", 36 cflags: [ 37 "-Wall", 38 "-Werror", 39 "-Wextra", 40 ], 41 header_libs: ["libgtest_prod_headers"], 42 static_libs: [ 43 "libbase", 44 "libgtest", 45 ], 46 // TODO(b/174366536): basic_stringbuf::overflow causes "ubsan: implicit-conversion" 47 // sanitize: { 48 // integer_overflow: true, 49 // misc_undefined: ["integer"], 50 // }, 51 target: { 52 windows: { 53 enabled: true, 54 }, 55 host: { 56 cflags: [ 57 "-O0", 58 "-g", 59 ], 60 }, 61 }, 62 product_variables: { 63 platform_sdk_version: { 64 cflags: ["-DPLATFORM_SDK_VERSION=%d"], 65 }, 66 }, 67 defaults_visibility: [":__subpackages__"], 68} 69 70// Logic shared between aidl and its unittests 71cc_library_static { 72 name: "libaidl-common", 73 defaults: ["aidl_defaults"], 74 host_supported: true, 75 76 srcs: [ 77 "aidl_checkapi.cpp", 78 "aidl_const_expressions.cpp", 79 "aidl_dumpapi.cpp", 80 "aidl_language_l.ll", 81 "aidl_language_y.yy", 82 "aidl_language.cpp", 83 "aidl_to_cpp_common.cpp", 84 "aidl_to_cpp.cpp", 85 "aidl_to_java.cpp", 86 "aidl_to_ndk.cpp", 87 "aidl_to_rust.cpp", 88 "aidl_typenames.cpp", 89 "aidl.cpp", 90 "ast_java.cpp", 91 "check_valid.cpp", 92 "code_writer.cpp", 93 "comments.cpp", 94 "diagnostics.cpp", 95 "generate_aidl_mappings.cpp", 96 "generate_cpp.cpp", 97 "generate_cpp_analyzer.cpp", 98 "generate_java_binder.cpp", 99 "generate_java.cpp", 100 "generate_ndk.cpp", 101 "generate_rust.cpp", 102 "import_resolver.cpp", 103 "io_delegate.cpp", 104 "location.cpp", 105 "logging.cpp", 106 "options.cpp", 107 "parser.cpp", 108 "permission.cpp", 109 "preprocess.cpp", 110 ], 111 yacc: { 112 gen_location_hh: true, 113 gen_position_hh: true, 114 }, 115 visibility: [":__subpackages__"], 116} 117 118// aidl executable 119cc_binary_host { 120 name: "aidl", 121 defaults: ["aidl_defaults"], 122 srcs: ["main.cpp"], 123 static_libs: [ 124 "libaidl-common", 125 "libbase", 126 "liblog", 127 ], 128} 129 130// aidl-cpp legacy executable, please use 'aidl' instead 131cc_binary_host { 132 name: "aidl-cpp", 133 defaults: ["aidl_defaults"], 134 srcs: ["main.cpp"], 135 cflags: ["-DAIDL_CPP_BUILD"], 136 static_libs: [ 137 "libaidl-common", 138 "libbase", 139 "liblog", 140 ], 141} 142 143// Unit tests 144cc_test { 145 name: "aidl_unittests", 146 host_supported: true, 147 148 test_suites: ["general-tests"], 149 150 cflags: [ 151 "-Wall", 152 "-Wextra", 153 "-Werror", 154 "-g", 155 ], 156 157 tidy_timeout_srcs: [ 158 "aidl_unittest.cpp", 159 "options_unittest.cpp", 160 ], 161 162 srcs: [ 163 "aidl_unittest.cpp", 164 "ast_java_unittest.cpp", 165 "code_writer_unittest.cpp", 166 "diagnostics_unittest.cpp", 167 "generate_cpp_unittest.cpp", 168 "io_delegate_unittest.cpp", 169 "options_unittest.cpp", 170 "tests/fake_io_delegate.cpp", 171 "tests/main.cpp", 172 "tests/test_util.cpp", 173 ], 174 175 static_libs: [ 176 "libaidl-common", 177 "libbase", 178 "libcutils", 179 "libgmock", 180 "liblog", 181 ], 182 183 target: { 184 host: { 185 sanitize: { 186 address: true, 187 }, 188 }, 189 }, 190 191 required: ["aidl-golden-test-build-hook"], 192} 193 194cc_fuzz { 195 name: "aidl_parser_fuzzer", 196 host_supported: true, 197 dictionary: "tests/aidl_parser_fuzzer.dict", 198 corpus: [ 199 "tests/corpus/*", 200 ], 201 202 fuzz_config: { 203 cc: [ 204 "aidl-bugs@google.com", 205 ], 206 }, 207 208 srcs: [ 209 "tests/aidl_parser_fuzzer.cpp", 210 "tests/fake_io_delegate.cpp", 211 "tests/test_util.cpp", 212 ], 213 static_libs: [ 214 "libaidl-common", 215 "libbase", 216 "libcutils", 217 "libgtest", 218 "liblog", 219 ], 220 // Enable this to show additional information about what is being parsed during fuzzing. 221 // cflags: ["-DFUZZ_LOG"], 222} 223 224// 225// Integration testing of generated AIDL code. 226// 227 228python_test_host { 229 name: "aidl_integration_test", 230 main: "tests/aidl_integration_test.py", 231 srcs: ["tests/aidl_integration_test.py"], 232 test_config: "tests/aidl_integration_test.xml", 233 target_required: [ 234 "aidl_test_client", 235 "aidl_test_client_ndk", 236 "aidl_test_service", 237 "aidl_test_java_client", 238 "aidl_test_java_service", 239 "aidl_test_rust_client", 240 "aidl_test_rust_service", 241 "aidl_test_rust_service_async", 242 "aidl_test_java_client_sdk1", 243 "aidl_test_java_service_sdk1", 244 "aidl_test_java_client_sdk29", 245 "aidl_test_java_service_sdk29", 246 "aidl_test_java_client_permission", 247 "aidl_test_java_service_permission", 248 ], 249 test_suites: ["general-tests"], 250 test_options: { 251 unit_test: false, 252 }, 253} 254 255cc_defaults { 256 name: "aidl_test_defaults", 257 cflags: [ 258 "-Wall", 259 "-Wextra", 260 "-Werror", 261 ], 262 shared_libs: [ 263 "libbase", 264 "libbinder", 265 "liblog", 266 "libutils", 267 ], 268 compile_multilib: "both", 269 multilib: { 270 lib32: { 271 suffix: "32", 272 }, 273 lib64: { 274 suffix: "64", 275 }, 276 }, 277 test_suites: ["general-tests"], 278} 279 280// Header-only library used for atrace in platform NDK builds 281cc_library_headers { 282 name: "libandroid_aidltrace", 283 host_supported: true, 284 vendor_available: true, 285 export_include_dirs: ["trace"], 286 apex_available: [ 287 "//apex_available:platform", 288 "//apex_available:anyapex", 289 ], 290} 291 292filegroup { 293 name: "libaidl-integration-test-files", 294 srcs: [ 295 "tests/android/aidl/tests/ArrayOfInterfaces.aidl", 296 "tests/android/aidl/tests/BackendType.aidl", 297 "tests/android/aidl/tests/ByteEnum.aidl", 298 "tests/android/aidl/tests/CircularParcelable.aidl", 299 "tests/android/aidl/tests/ConstantExpressionEnum.aidl", 300 "tests/android/aidl/tests/DeprecatedEnum.aidl", 301 "tests/android/aidl/tests/DeprecatedParcelable.aidl", 302 "tests/android/aidl/tests/GenericStructuredParcelable.aidl", 303 "tests/android/aidl/tests/FixedSize.aidl", 304 "tests/android/aidl/tests/ICircular.aidl", 305 "tests/android/aidl/tests/IDeprecated.aidl", 306 "tests/android/aidl/tests/INamedCallback.aidl", 307 "tests/android/aidl/tests/INewName.aidl", 308 "tests/android/aidl/tests/IOldName.aidl", 309 "tests/android/aidl/tests/ITestService.aidl", 310 "tests/android/aidl/tests/IntEnum.aidl", 311 "tests/android/aidl/tests/ListOfInterfaces.aidl", 312 "tests/android/aidl/tests/LongEnum.aidl", 313 "tests/android/aidl/tests/OtherParcelableForToString.aidl", 314 "tests/android/aidl/tests/ParcelableForToString.aidl", 315 "tests/android/aidl/tests/RecursiveList.aidl", 316 "tests/android/aidl/tests/StructuredParcelable.aidl", 317 "tests/android/aidl/tests/Union.aidl", 318 "tests/android/aidl/tests/UnionWithFd.aidl", 319 "tests/android/aidl/tests/extension/*.aidl", 320 "tests/android/aidl/tests/nested/*.aidl", 321 "tests/android/aidl/tests/unions/*.aidl", 322 ], 323 path: "tests", 324} 325 326filegroup { 327 name: "libaidl-integration-cpp-java-test-files", 328 srcs: [ 329 "tests/android/aidl/tests/BadParcelable.aidl", 330 "tests/android/aidl/tests/ICppJavaTests.aidl", 331 "tests/android/aidl/tests/SimpleParcelable.aidl", 332 ], 333 path: "tests", 334} 335 336filegroup { 337 name: "libaidl-integration-permission-test-files", 338 srcs: [ 339 "tests/android/aidl/tests/permission/**/*.aidl", 340 ], 341 path: "tests", 342} 343 344aidl_interface { 345 name: "aidl-test-versioned-interface", 346 local_include_dir: "tests/versioned", 347 flags: ["-Werror"], 348 srcs: [ 349 "tests/versioned/**/*.aidl", 350 ], 351 352 backend: { 353 java: { 354 gen_rpc: true, 355 }, 356 rust: { 357 enabled: true, 358 }, 359 }, 360 versions_with_info: [ 361 { 362 version: "1", 363 imports: [], 364 }, 365 { 366 version: "2", 367 imports: [], 368 }, 369 { 370 version: "3", 371 imports: [], 372 }, 373 374 ], 375 frozen: true, 376 377} 378 379cc_library_static { 380 name: "libaidl-integration-test", 381 defaults: ["aidl_test_defaults"], 382 aidl: { 383 generate_traces: true, 384 export_aidl_headers: true, 385 local_include_dirs: ["tests"], 386 include_dirs: [ 387 "frameworks/native/aidl/binder", 388 ], 389 }, 390 srcs: [ 391 ":libaidl-integration-test-files", 392 ":libaidl-integration-cpp-java-test-files", 393 "tests/bad_parcelable.cpp", 394 "tests/simple_parcelable.cpp", 395 ], 396} 397 398cc_test { 399 name: "aidl_test_service", 400 gtest: false, 401 defaults: ["aidl_test_defaults"], 402 static_libs: [ 403 "libaidl-integration-test", 404 "libcutils", 405 // service uses the old version 406 "aidl-test-versioned-interface-V1-cpp", 407 "aidl_test_loggable_interface-cpp", 408 "aidl-test-fixedsizearray-cpp", 409 ], 410 srcs: ["tests/aidl_test_service.cpp"], 411} 412 413cc_test { 414 name: "aidl_test_client", 415 defaults: ["aidl_test_defaults"], 416 static_libs: [ 417 "libaidl-integration-test", 418 "libcutils", 419 "libgmock", 420 // client uses the latest version 421 "aidl-test-versioned-interface-V2-cpp", 422 "aidl_test_loggable_interface-cpp", 423 "aidl-test-fixedsizearray-cpp", 424 ], 425 tidy_timeout_srcs: [ 426 "tests/aidl_test_client_parcelables.cpp", 427 "tests/aidl_test_client_primitives.cpp", 428 ], 429 srcs: [ 430 "tests/aidl_test_client.cpp", 431 "tests/aidl_test_client_builtin_transactions.cpp", 432 "tests/aidl_test_client_file_descriptors.cpp", 433 "tests/aidl_test_client_parcelables.cpp", 434 "tests/aidl_test_client_nullables.cpp", 435 "tests/aidl_test_client_primitives.cpp", 436 "tests/aidl_test_client_utf8_strings.cpp", 437 "tests/aidl_test_client_service_exceptions.cpp", 438 "tests/aidl_test_client_defaultimpl.cpp", 439 "tests/aidl_test_client_delegate.cpp", 440 "tests/aidl_test_client_versioned_interface.cpp", 441 "tests/aidl_test_client_renamed_interface.cpp", 442 "tests/aidl_test_client_loggable_interface.cpp", 443 "tests/aidl_test_client_nested.cpp", 444 ], 445} 446 447cc_test { 448 name: "aidl_test_client_ndk", 449 defaults: ["aidl_test_defaults"], 450 static_libs: [ 451 "libcutils", 452 "libgmock", 453 // client uses the latest version 454 "aidl-test-versioned-interface-V2-ndk", 455 "aidl-test-interface-ndk", 456 "aidl_test_loggable_interface-ndk", 457 "aidl-test-fixedsizearray-ndk", 458 ], 459 shared_libs: [ 460 "libbinder_ndk", 461 ], 462 srcs: [ 463 "tests/aidl_test_client_ndk_delegate.cpp", 464 "tests/aidl_test_client_ndk_loggable_interface.cpp", 465 "tests/aidl_test_client_ndk_nested.cpp", 466 "tests/aidl_test_client_ndk_nullables.cpp", 467 "tests/aidl_test_client_ndk_parcelables.cpp", 468 "tests/aidl_test_client_ndk_primitives_test.cpp", 469 "tests/aidl_test_client_ndk_strings_test.cpp", 470 "tests/aidl_test_client_ndk_versioned_interface.cpp", 471 ], 472} 473 474aidl_interface { 475 name: "aidl-test-fixedsizearray", 476 srcs: ["tests/android/aidl/fixedsizearray/FixedSizeArrayExample.aidl"], 477 local_include_dir: "tests", 478 unstable: true, 479 backend: { 480 cpp: { 481 enabled: true, 482 }, 483 java: { 484 enabled: true, 485 }, 486 ndk: { 487 enabled: true, 488 }, 489 rust: { 490 enabled: true, 491 }, 492 }, 493} 494 495java_defaults { 496 name: "aidl_test_java_integration_defaults", 497 platform_apis: true, 498 // Turn off Java optimization tools to speed up our test iterations. 499 optimize: { 500 enabled: false, 501 }, 502 dex_preopt: { 503 enabled: false, 504 }, 505 static_libs: [ 506 "androidx.test.core", 507 "androidx.test.runner", 508 ], 509 aidl: { 510 include_dirs: [ 511 "frameworks/native/aidl/binder", 512 ], 513 }, 514 test_suites: ["general-tests"], 515} 516 517java_defaults { 518 name: "aidl_test_java_defaults", 519 defaults: ["aidl_test_java_integration_defaults"], 520 static_libs: [ 521 "aidl_test_nonvintf_parcelable-V1-java", 522 "aidl_test_unstable_parcelable-java", 523 "aidl_test_vintf_parcelable-V1-java", 524 "aidl-test-fixedsizearray-java", 525 // TODO: remove once Android migrates to JUnit 4.12, 526 // which provides assertThrows 527 "testng", 528 ], 529 srcs: [ 530 "tests/android/aidl/tests/*.aidl", 531 "tests/android/aidl/tests/generic/*.aidl", 532 "tests/android/aidl/tests/immutable/*.aidl", 533 "tests/android/aidl/tests/map/*.aidl", 534 "tests/android/aidl/tests/extension/*.aidl", 535 "tests/android/aidl/tests/nested/*.aidl", 536 "tests/android/aidl/tests/unions/*.aidl", 537 "tests/java/src/android/aidl/tests/BadParcelable.java", 538 "tests/java/src/android/aidl/tests/SimpleParcelable.java", 539 "tests/java/src/android/aidl/tests/generic/Pair.java", 540 ], 541 aidl: { 542 include_dirs: [ 543 "system/tools/aidl/tests/", 544 ], 545 generate_traces: true, 546 }, 547} 548 549java_test { 550 name: "aidl_test_java_client", 551 defaults: ["aidl_test_java_defaults"], 552 static_libs: [ 553 // client uses the new version 554 "aidl-test-versioned-interface-V3-java", 555 ], 556 // tests are included in defaults 557 srcs: [ 558 "tests/java/src/android/aidl/tests/MapTests.java", 559 "tests/java/src/android/aidl/tests/TestServiceClient.java", 560 "tests/java/src/android/aidl/tests/JavaOnlyImmutableAnnotationTests.java", 561 "tests/java/src/android/aidl/tests/AidlJavaTests.java", 562 "tests/java/src/android/aidl/tests/BuiltInTests.java", 563 "tests/java/src/android/aidl/tests/DelegatorTests.java", 564 "tests/java/src/android/aidl/tests/GenericTests.java", 565 "tests/java/src/android/aidl/tests/NestedTypesTests.java", 566 "tests/java/src/android/aidl/tests/TestVersionedInterface.java", 567 "tests/java/src/android/aidl/tests/UnionTests.java", 568 "tests/java/src/android/aidl/tests/ExtensionTests.java", 569 "tests/java/src/android/aidl/tests/NullableTests.java", 570 "tests/java/src/android/aidl/tests/VintfTests.java", 571 ], 572 data: [ 573 ":cts-dalvik-device-test-runner", 574 ], 575} 576 577java_test { 578 name: "aidl_test_java_service", 579 defaults: ["aidl_test_java_defaults"], 580 static_libs: [ 581 // service uses the old version 582 "aidl-test-versioned-interface-V1-java", 583 ], 584 srcs: [ 585 "tests/java/src/android/aidl/service/**/*.java", 586 ], 587 data: [ 588 ":cts-dalvik-device-test-runner", 589 ], 590} 591 592filegroup { 593 name: "aidl-for-sdkversion-tests", 594 srcs: [ 595 "tests/java/src/android/aidl/sdkversion/ITestService.aidl", 596 ], 597 path: "tests/java/src", 598} 599 600java_defaults { 601 name: "aidl_test_java_sdkversion_defaults", 602 defaults: ["aidl_test_java_integration_defaults"], 603 srcs: [ 604 ":aidl-for-sdkversion-tests", 605 ], 606} 607 608java_test { 609 name: "aidl_test_java_client_sdk29", 610 defaults: ["aidl_test_java_sdkversion_defaults"], 611 min_sdk_version: "29", 612 data: [ 613 ":cts-dalvik-device-test-runner", 614 ], 615 srcs: [ 616 "tests/java/src/android/aidl/sdkversion/tests/*.java", 617 ], 618} 619 620java_test { 621 name: "aidl_test_java_service_sdk29", 622 defaults: ["aidl_test_java_sdkversion_defaults"], 623 min_sdk_version: "29", 624 srcs: [ 625 "tests/java/src/android/aidl/sdkversion/service/*.java", 626 ], 627 data: [ 628 ":cts-dalvik-device-test-runner", 629 ], 630} 631 632java_test { 633 name: "aidl_test_java_client_sdk1", 634 defaults: ["aidl_test_java_sdkversion_defaults"], 635 min_sdk_version: "1", 636 srcs: [ 637 "tests/java/src/android/aidl/sdkversion/tests/*.java", 638 ], 639 data: [ 640 ":cts-dalvik-device-test-runner", 641 ], 642} 643 644java_test { 645 name: "aidl_test_java_service_sdk1", 646 defaults: ["aidl_test_java_sdkversion_defaults"], 647 min_sdk_version: "1", 648 data: [ 649 ":cts-dalvik-device-test-runner", 650 ], 651 srcs: [ 652 "tests/java/src/android/aidl/sdkversion/service/*.java", 653 ], 654} 655 656java_test { 657 name: "aidl_test_java_client_permission", 658 defaults: ["aidl_test_java_integration_defaults"], 659 static_libs: [ 660 "aidl-test-interface-permission-java", 661 ], 662 srcs: [ 663 "tests/java/src/android/aidl/permission/tests/*.java", 664 "tests/java/src/android/aidl/permission/service/*.java", 665 ], 666 data: [ 667 ":cts-dalvik-device-test-runner", 668 ], 669} 670 671java_test { 672 name: "aidl_test_java_service_permission", 673 defaults: ["aidl_test_java_integration_defaults"], 674 static_libs: [ 675 "aidl-test-interface-permission-java", 676 ], 677 data: [ 678 ":cts-dalvik-device-test-runner", 679 ], 680 srcs: [ 681 "tests/java/src/android/aidl/permission/service/*.java", 682 ], 683} 684 685// 686// "Golden" test of compiler output 687// 688 689sh_binary_host { 690 name: "aidl-golden-test", 691 src: "tests/golden_test.sh", 692} 693 694genrule { 695 name: "aidl-golden-test-build-hook-gen", 696 tools: ["aidl-golden-test"], 697 cmd: "$(location aidl-golden-test) check && " + 698 "echo 'int main(){return 0;}' > $(genDir)/TODO_b_37575883.cpp", 699 srcs: [ 700 // warning: keep this list up to date with tests/golden_test.sh 701 ":aidl-test-interface-cpp-source", 702 ":aidl-test-interface-java-source", 703 ":aidl-test-versioned-interface-V1-cpp-source", 704 ":aidl-test-versioned-interface-V1-java-source", 705 ":aidl-test-versioned-interface-V1-ndk-source", 706 ":aidl-test-versioned-interface-V1-rust-source", 707 ":aidl-test-interface-ndk-source", 708 ":aidl-test-interface-rust-source", 709 ":aidl_test_loggable_interface-cpp-source", 710 ":aidl_test_loggable_interface-java-source", 711 ":aidl_test_loggable_interface-ndk-source", 712 ":aidl-test-interface-permission-java-source", 713 ":aidl-test-fixedsizearray-cpp-source", 714 ":aidl-test-fixedsizearray-java-source", 715 ":aidl-test-fixedsizearray-ndk-source", 716 ":aidl-test-fixedsizearray-rust-source", 717 ":aidl-test-interface-cpp-analyzer-source", 718 "tests/golden_output/**/*", 719 ], 720 out: ["TODO_b_37575883.cpp"], 721} 722 723cc_test_host { 724 name: "aidl-golden-test-build-hook", 725 generated_sources: ["aidl-golden-test-build-hook-gen"], 726 gtest: false, 727} 728 729// 730// Testing generation of logs 731// 732 733aidl_interface { 734 name: "aidl_test_loggable_interface", 735 unstable: true, 736 local_include_dir: "tests", 737 flags: ["-Werror"], 738 srcs: [ 739 "tests/android/aidl/loggable/ILoggableInterface.aidl", 740 "tests/android/aidl/loggable/Data.aidl", 741 "tests/android/aidl/loggable/Enum.aidl", 742 "tests/android/aidl/loggable/Union.aidl", 743 ], 744 gen_trace: true, 745 backend: { 746 cpp: { 747 gen_log: true, 748 }, 749 ndk: { 750 gen_log: true, 751 }, 752 java: { 753 platform_apis: true, 754 }, 755 }, 756} 757 758aidl_interface { 759 name: "aidl-test-interface", 760 unstable: true, 761 flags: ["-Werror"], 762 srcs: [":libaidl-integration-test-files"], 763 local_include_dir: "tests", 764 backend: { 765 cpp: { 766 }, 767 java: { 768 platform_apis: true, 769 }, 770 rust: { 771 enabled: true, 772 }, 773 ndk: { 774 apps_enabled: false, 775 }, 776 }, 777} 778 779aidl_interface { 780 name: "aidl-test-interface-permission", 781 unstable: true, 782 flags: ["-Werror"], 783 srcs: [":libaidl-integration-permission-test-files"], 784 include_dirs: [ 785 "frameworks/base/core/java", 786 ], 787 local_include_dir: "tests", 788 backend: { 789 cpp: { 790 enabled: false, 791 }, 792 java: { 793 platform_apis: true, 794 }, 795 rust: { 796 enabled: false, 797 }, 798 ndk: { 799 enabled: false, 800 }, 801 }, 802} 803 804// 805// Rust tests 806// 807 808rust_test { 809 name: "aidl_test_rust_client", 810 srcs: [ 811 "tests/rust/test_client.rs", 812 ], 813 rustlibs: [ 814 "aidl-test-interface-rust", 815 "aidl-test-versioned-interface-V2-rust", 816 "aidl_test_nonvintf_parcelable-V1-rust", 817 "aidl_test_unstable_parcelable-rust", 818 "aidl_test_vintf_parcelable-V1-rust", 819 "aidl-test-fixedsizearray-rust", 820 "liblibc", 821 // We need to import binder_rs directly 822 // for a few internal types like Parcel 823 // and traits like Parcelable 824 "libbinder_rs", 825 ], 826 prefer_rlib: true, 827 compile_multilib: "both", 828 multilib: { 829 lib32: { 830 suffix: "32", 831 }, 832 lib64: { 833 suffix: "64", 834 }, 835 }, 836 test_suites: ["general-tests"], 837} 838 839rust_test { 840 name: "aidl_test_rust_service", 841 test_harness: false, 842 srcs: [ 843 "tests/rust/test_service.rs", 844 ], 845 rustlibs: [ 846 "aidl-test-interface-rust", 847 "aidl-test-versioned-interface-V1-rust", 848 "aidl-test-fixedsizearray-rust", 849 "liblibc", 850 ], 851 prefer_rlib: true, 852 compile_multilib: "both", 853 multilib: { 854 lib32: { 855 suffix: "32", 856 }, 857 lib64: { 858 suffix: "64", 859 }, 860 }, 861 test_suites: ["general-tests"], 862} 863 864rust_test { 865 name: "aidl_test_rust_service_async", 866 test_harness: false, 867 srcs: [ 868 "tests/rust/test_service_async.rs", 869 ], 870 rustlibs: [ 871 "aidl-test-interface-rust", 872 "aidl-test-versioned-interface-V1-rust", 873 "liblibc", 874 "libbinder_tokio_rs", 875 "libtokio", 876 ], 877 proc_macros: ["libasync_trait"], 878 prefer_rlib: true, 879 compile_multilib: "both", 880 multilib: { 881 lib32: { 882 suffix: "32", 883 }, 884 lib64: { 885 suffix: "64", 886 }, 887 }, 888 test_suites: ["general-tests"], 889} 890 891cc_library_static { 892 name: "aidl-analyzer-main", 893 host_supported: true, 894 vendor_available: true, 895 shared_libs: [ 896 "libbase", 897 "libbinder", 898 ], 899 srcs: [ 900 "analyzer/analyzerMain.cpp", 901 "analyzer/Analyzer.cpp", 902 ], 903 export_include_dirs: ["analyzer/include"], 904} 905 906cc_binary { 907 name: "record_binder", 908 whole_static_libs: ["aidl-analyzer-main"], 909 shared_libs: [ 910 "libbase", 911 "libbinder", 912 "libutils", 913 ], 914} 915