blob: baba64fdf8ff32c98e0b1da73d87f40f3f43de8f [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",
23 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070024 "liblog",
25 "libutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080026 "libvkjson",
Peiyong Lin2da74652018-11-01 10:34:57 -070027 ],
28 static_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080029 "libserviceutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080030 ],
31 export_static_lib_headers: [
32 "libserviceutils",
33 ],
34 export_shared_lib_headers: [
35 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070036 ],
37}
38
39cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080040 name: "libgpuservice_production_defaults",
41 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070042 cflags: [
43 "-fvisibility=hidden",
44 "-fwhole-program-vtables", // requires ThinLTO
45 ],
46 lto: {
47 thin: true,
48 },
49}
50
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080051filegroup {
52 name: "libgpuservice_sources",
53 srcs: [
54 "GpuService.cpp",
55 "gpustats/GpuStats.cpp"
56 ],
57}
58
59cc_library_shared {
60 name: "libgpuservice",
61 defaults: ["libgpuservice_production_defaults"],
62 srcs: [
63 ":libgpuservice_sources",
64 ],
65}
66
Peiyong Lin2da74652018-11-01 10:34:57 -070067cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080068 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070069 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070070 shared_libs: [
71 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080072 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070073 "liblog",
74 "libutils",
75 ],
76 ldflags: ["-Wl,--export-dynamic"],
77}
78
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080079filegroup {
80 name: "gpuservice_binary_sources",
81 srcs: ["main_gpuservice.cpp"],
82}
83
Peiyong Lin2da74652018-11-01 10:34:57 -070084cc_binary {
85 name: "gpuservice",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080086 defaults: ["libgpuservice_binary"],
Peiyong Lin2da74652018-11-01 10:34:57 -070087 init_rc: ["gpuservice.rc"],
88 srcs: [":gpuservice_binary_sources"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080089 shared_libs: [
90 "libgpuservice",
91 ],
Peiyong Lin2da74652018-11-01 10:34:57 -070092}