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 10aconfig_declarations { 11 name: "gpuservice_flags", 12 package: "com.android.frameworks.gpuservice.flags", 13 container: "system", 14 srcs: ["gpuservice_flags.aconfig"], 15} 16 17cc_defaults { 18 name: "gpuservice_defaults", 19 cflags: [ 20 "-Wall", 21 "-Werror", 22 "-Wformat", 23 "-Wthread-safety", 24 "-Wunused", 25 "-Wunreachable-code", 26 ], 27} 28 29cc_aconfig_library { 30 name: "gpuservice_multiuser_flags_c_lib", 31 aconfig_declarations: "gpuservice_flags", 32} 33 34cc_aconfig_library { 35 name: "gpuservice_flags_c_lib", 36 aconfig_declarations: "graphicsenv_flags", 37} 38 39cc_defaults { 40 name: "libgpuservice_defaults", 41 defaults: [ 42 "aconfig_lib_cc_static_link.defaults", 43 "gpuservice_defaults", 44 "libfeatureoverride_deps", 45 "libgfxstats_deps", 46 "libgpumem_deps", 47 "libgpumemtracer_deps", 48 "libvkjson_deps", 49 "libvkprofiles_deps", 50 ], 51 cflags: [ 52 "-DLOG_TAG=\"GpuService\"", 53 ], 54 shared_libs: [ 55 "libbase", 56 "libbinder", 57 "libcutils", 58 "libgpuwork", 59 "libgraphicsenv", 60 "liblog", 61 "libutils", 62 "server_configurable_flags", 63 ], 64 static_libs: [ 65 "gpuservice_flags_c_lib", 66 "libfeatureoverride", 67 "libgfxstats", 68 "libgpumem", 69 "libgpumemtracer", 70 "libserviceutils", 71 "libvkjson", 72 "libvkprofiles", 73 ], 74 export_static_lib_headers: [ 75 "libserviceutils", 76 ], 77 export_shared_lib_headers: [ 78 "libgraphicsenv", 79 ], 80} 81 82cc_defaults { 83 name: "libgpuservice_production_defaults", 84 defaults: ["libgpuservice_defaults"], 85 cflags: [ 86 "-fvisibility=hidden", 87 ], 88 lto: { 89 thin: true, 90 }, 91 whole_program_vtables: true, // Requires ThinLTO 92} 93 94filegroup { 95 name: "libgpuservice_sources", 96 srcs: [ 97 "GpuService.cpp", 98 ], 99} 100 101cc_library_static { 102 name: "libgpuservice", 103 defaults: ["libgpuservice_production_defaults"], 104 export_include_dirs: ["include"], 105 srcs: [ 106 ":libgpuservice_sources", 107 ], 108 shared_libs: [ 109 "gpuservice_multiuser_flags_c_lib", 110 ], 111} 112 113cc_defaults { 114 name: "libgpuservice_binary", 115 defaults: ["gpuservice_defaults"], 116 shared_libs: [ 117 "libbinder", 118 "libcutils", 119 "liblog", 120 "libutils", 121 ], 122 ldflags: ["-Wl,--export-dynamic"], 123} 124 125filegroup { 126 name: "gpuservice_binary_sources", 127 srcs: ["main_gpuservice.cpp"], 128} 129 130cc_binary { 131 name: "gpuservice", 132 defaults: [ 133 "libgpuservice_binary", 134 "libgpuservice_production_defaults", 135 ], 136 init_rc: ["gpuservice.rc"], 137 required: [ 138 "bpfloader", 139 "gpuMem.o", 140 ], 141 srcs: [":gpuservice_binary_sources"], 142 static_libs: [ 143 "libgpuservice", 144 ], 145 shared_libs: [ 146 "gpuservice_multiuser_flags_c_lib", 147 ], 148} 149