1// build time C++ available list of all HIDL interfaces in the tree 2package { 3 // See: http://go/android-license-faq 4 // A large-scale-change added 'default_applicable_licenses' to import 5 // all of the 'license_kinds' from "system_tools_hidl_license" 6 // to get the below license kinds: 7 // SPDX-license-identifier-Apache-2.0 8 default_applicable_licenses: ["system_tools_hidl_license"], 9} 10 11cc_library { 12 name: "libhidlmetadata", 13 host_supported: true, 14 srcs: [":hidl_metadata_in_cpp"], 15 export_include_dirs: ["include"], 16 17 cflags: ["-O0"], 18} 19 20cc_library_headers { 21 name: "libhidlmetadata_headers", 22 product_available: true, 23 recovery_available: true, 24 host_supported: true, 25 export_include_dirs: ["include"], 26} 27 28cc_test_host { 29 name: "hidl_metadata_test", 30 srcs: ["test.cpp"], 31 static_libs: [ 32 "libhidlmetadata", 33 "libgmock", 34 ], 35} 36 37prebuilt_hidl_interfaces { 38 name: "hidl_metadata_test_interfaces1", 39 interfaces: [ 40 "hidl.metadata.test@1.0::IBar", 41 ], 42} 43 44prebuilt_hidl_interfaces { 45 name: "hidl_metadata_test_interfaces2", 46 interfaces: [ 47 "hidl.metadata.test@1.0::IBaz", 48 "hidl.metadata.test@1.0::IFoo", 49 ], 50} 51 52// private impl below 53 54cc_binary { 55 name: "hidl_metadata_parser", 56 host_supported: true, 57 srcs: ["parser.cpp"], 58 shared_libs: ["libjsoncpp"], 59 visibility: [":__subpackages__"], 60} 61 62cc_genrule { 63 name: "hidl_metadata_in_cpp", 64 host_supported: true, 65 cmd: "$(location hidl_metadata_parser) $(in) > $(genDir)/metadata.cpp", 66 srcs: [ 67 ":hidl_metadata_json", 68 ], 69 tools: ["hidl_metadata_parser"], 70 visibility: [":__subpackages__"], 71 out: ["metadata.cpp"], 72} 73