blob: 6eed24a17bc5ce251740c23af93b5080e677a5d2 [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 Zhangcb9d4e42019-02-06 20:22:59 -080024 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070025 "liblog",
26 "libutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080027 "libvkjson",
Peiyong Lin2da74652018-11-01 10:34:57 -070028 ],
29 static_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080030 "libserviceutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080031 ],
32 export_static_lib_headers: [
33 "libserviceutils",
34 ],
35 export_shared_lib_headers: [
36 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070037 ],
38}
39
40cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080041 name: "libgpuservice_production_defaults",
42 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070043 cflags: [
44 "-fvisibility=hidden",
45 "-fwhole-program-vtables", // requires ThinLTO
46 ],
47 lto: {
48 thin: true,
49 },
50}
51
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080052filegroup {
53 name: "libgpuservice_sources",
54 srcs: [
55 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080056 ],
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}