blob: a75d6db11b01e07f96877dd800e41ae1129b3d0c [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",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080025 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070026 "liblog",
27 "libutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080028 "libvkjson",
Peiyong Lin2da74652018-11-01 10:34:57 -070029 ],
30 static_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080031 "libserviceutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080032 ],
33 export_static_lib_headers: [
34 "libserviceutils",
35 ],
36 export_shared_lib_headers: [
37 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070038 ],
39}
40
41cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080042 name: "libgpuservice_production_defaults",
43 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070044 cflags: [
45 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070046 ],
47 lto: {
48 thin: true,
49 },
Yi Kongbf2aa782020-09-21 01:25:16 +080050 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070051}
52
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080053filegroup {
54 name: "libgpuservice_sources",
55 srcs: [
56 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080057 ],
58}
59
60cc_library_shared {
61 name: "libgpuservice",
62 defaults: ["libgpuservice_production_defaults"],
63 srcs: [
64 ":libgpuservice_sources",
65 ],
66}
67
Peiyong Lin2da74652018-11-01 10:34:57 -070068cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080069 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070070 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070071 shared_libs: [
72 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080073 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070074 "liblog",
75 "libutils",
76 ],
77 ldflags: ["-Wl,--export-dynamic"],
78}
79
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080080filegroup {
81 name: "gpuservice_binary_sources",
82 srcs: ["main_gpuservice.cpp"],
83}
84
Peiyong Lin2da74652018-11-01 10:34:57 -070085cc_binary {
86 name: "gpuservice",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080087 defaults: ["libgpuservice_binary"],
Peiyong Lin2da74652018-11-01 10:34:57 -070088 init_rc: ["gpuservice.rc"],
Yiwei Zhangc5aa7382020-02-19 15:44:17 -080089 required: [
90 "bpfloader",
91 "gpu_mem.o",
92 ],
Peiyong Lin2da74652018-11-01 10:34:57 -070093 srcs: [":gpuservice_binary_sources"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080094 shared_libs: [
95 "libgpuservice",
96 ],
Peiyong Lin2da74652018-11-01 10:34:57 -070097}