blob: 9a9bca1478dccd10b4d8369d071054ee6efadc75 [file] [log] [blame]
Peiyong Lin2da74652018-11-01 10:34:57 -07001cc_defaults {
2 name: "gpuservice_defaults",
3 cflags: [
Peiyong Lin2da74652018-11-01 10:34:57 -07004 "-Wall",
5 "-Werror",
6 "-Wformat",
7 "-Wthread-safety",
8 "-Wunused",
9 "-Wunreachable-code",
10 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080011}
12
13cc_defaults {
14 name: "libgpuservice_defaults",
15 defaults: ["gpuservice_defaults"],
16 cflags: [
17 "-DLOG_TAG=\"GpuService\"",
Peiyong Lin2da74652018-11-01 10:34:57 -070018 ],
19 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080020 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070021 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080022 "libcutils",
Yiwei Zhangbaaef882020-02-02 17:45:30 -080023 "libgfxstats",
Yiwei Zhangc5aa7382020-02-19 15:44:17 -080024 "libgpumem",
Adithya Srinivasanbb66c982020-06-18 11:28:12 -070025 "libgpumemtracer",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080026 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070027 "liblog",
28 "libutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080029 "libvkjson",
Peiyong Lin2da74652018-11-01 10:34:57 -070030 ],
31 static_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080032 "libserviceutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080033 ],
34 export_static_lib_headers: [
35 "libserviceutils",
36 ],
37 export_shared_lib_headers: [
38 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070039 ],
40}
41
42cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080043 name: "libgpuservice_production_defaults",
44 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070045 cflags: [
46 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070047 ],
48 lto: {
49 thin: true,
50 },
Yi Kongbf2aa782020-09-21 01:25:16 +080051 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070052}
53
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080054filegroup {
55 name: "libgpuservice_sources",
56 srcs: [
57 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080058 ],
59}
60
61cc_library_shared {
62 name: "libgpuservice",
63 defaults: ["libgpuservice_production_defaults"],
64 srcs: [
65 ":libgpuservice_sources",
66 ],
67}
68
Peiyong Lin2da74652018-11-01 10:34:57 -070069cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080070 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070071 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070072 shared_libs: [
73 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080074 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070075 "liblog",
76 "libutils",
77 ],
78 ldflags: ["-Wl,--export-dynamic"],
79}
80
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080081filegroup {
82 name: "gpuservice_binary_sources",
83 srcs: ["main_gpuservice.cpp"],
84}
85
Peiyong Lin2da74652018-11-01 10:34:57 -070086cc_binary {
87 name: "gpuservice",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080088 defaults: ["libgpuservice_binary"],
Peiyong Lin2da74652018-11-01 10:34:57 -070089 init_rc: ["gpuservice.rc"],
Yiwei Zhangc5aa7382020-02-19 15:44:17 -080090 required: [
91 "bpfloader",
92 "gpu_mem.o",
93 ],
Peiyong Lin2da74652018-11-01 10:34:57 -070094 srcs: [":gpuservice_binary_sources"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080095 shared_libs: [
96 "libgpuservice",
97 ],
Peiyong Lin2da74652018-11-01 10:34:57 -070098}