1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "frameworks_native_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["frameworks_native_license"], 8} 9 10cc_defaults { 11 name: "gpuservice_defaults", 12 cflags: [ 13 "-Wall", 14 "-Werror", 15 "-Wformat", 16 "-Wthread-safety", 17 "-Wunused", 18 "-Wunreachable-code", 19 ], 20} 21 22cc_defaults { 23 name: "libgpuservice_defaults", 24 defaults: ["gpuservice_defaults"], 25 cflags: [ 26 "-DLOG_TAG=\"GpuService\"", 27 ], 28 shared_libs: [ 29 "libbase", 30 "libbinder", 31 "libcutils", 32 "libgfxstats", 33 "libgpumem", 34 "libgpuwork", 35 "libgpumemtracer", 36 "libgraphicsenv", 37 "liblog", 38 "libutils", 39 "libvkjson", 40 ], 41 static_libs: [ 42 "libserviceutils", 43 ], 44 export_static_lib_headers: [ 45 "libserviceutils", 46 ], 47 export_shared_lib_headers: [ 48 "libgraphicsenv", 49 ], 50} 51 52cc_defaults { 53 name: "libgpuservice_production_defaults", 54 defaults: ["libgpuservice_defaults"], 55 cflags: [ 56 "-fvisibility=hidden", 57 ], 58 lto: { 59 thin: true, 60 }, 61 whole_program_vtables: true, // Requires ThinLTO 62} 63 64filegroup { 65 name: "libgpuservice_sources", 66 srcs: [ 67 "GpuService.cpp", 68 ], 69} 70 71cc_library_shared { 72 name: "libgpuservice", 73 defaults: ["libgpuservice_production_defaults"], 74 srcs: [ 75 ":libgpuservice_sources", 76 ], 77} 78 79cc_defaults { 80 name: "libgpuservice_binary", 81 defaults: ["gpuservice_defaults"], 82 shared_libs: [ 83 "libbinder", 84 "libcutils", 85 "liblog", 86 "libutils", 87 ], 88 ldflags: ["-Wl,--export-dynamic"], 89} 90 91filegroup { 92 name: "gpuservice_binary_sources", 93 srcs: ["main_gpuservice.cpp"], 94} 95 96cc_binary { 97 name: "gpuservice", 98 defaults: ["libgpuservice_binary"], 99 init_rc: ["gpuservice.rc"], 100 required: [ 101 "bpfloader", 102 "gpu_mem.o", 103 ], 104 srcs: [":gpuservice_binary_sources"], 105 shared_libs: [ 106 "libgpuservice", 107 ], 108} 109