1cc_defaults { 2 name: "gpuservice_defaults", 3 cflags: [ 4 "-Wall", 5 "-Werror", 6 "-Wformat", 7 "-Wthread-safety", 8 "-Wunused", 9 "-Wunreachable-code", 10 ], 11} 12 13cc_defaults { 14 name: "libgpuservice_defaults", 15 defaults: ["gpuservice_defaults"], 16 cflags: [ 17 "-DLOG_TAG=\"GpuService\"", 18 ], 19 shared_libs: [ 20 "libbase", 21 "libbinder", 22 "libcutils", 23 "libgfxstats", 24 "libgraphicsenv", 25 "liblog", 26 "libutils", 27 "libvkjson", 28 ], 29 static_libs: [ 30 "libserviceutils", 31 ], 32 export_static_lib_headers: [ 33 "libserviceutils", 34 ], 35 export_shared_lib_headers: [ 36 "libgraphicsenv", 37 ], 38} 39 40cc_defaults { 41 name: "libgpuservice_production_defaults", 42 defaults: ["libgpuservice_defaults"], 43 cflags: [ 44 "-fvisibility=hidden", 45 "-fwhole-program-vtables", // requires ThinLTO 46 ], 47 lto: { 48 thin: true, 49 }, 50} 51 52filegroup { 53 name: "libgpuservice_sources", 54 srcs: [ 55 "GpuService.cpp", 56 ], 57} 58 59cc_library_shared { 60 name: "libgpuservice", 61 defaults: ["libgpuservice_production_defaults"], 62 srcs: [ 63 ":libgpuservice_sources", 64 ], 65} 66 67cc_defaults { 68 name: "libgpuservice_binary", 69 defaults: ["gpuservice_defaults"], 70 shared_libs: [ 71 "libbinder", 72 "libcutils", 73 "liblog", 74 "libutils", 75 ], 76 ldflags: ["-Wl,--export-dynamic"], 77} 78 79filegroup { 80 name: "gpuservice_binary_sources", 81 srcs: ["main_gpuservice.cpp"], 82} 83 84cc_binary { 85 name: "gpuservice", 86 defaults: ["libgpuservice_binary"], 87 init_rc: ["gpuservice.rc"], 88 srcs: [":gpuservice_binary_sources"], 89 shared_libs: [ 90 "libgpuservice", 91 ], 92} 93