blob: 7b8e0f835cbc640bbe5a459559c5116d0cf87735 [file] [log] [blame]
Peiyong Lin2da74652018-11-01 10:34:57 -07001filegroup {
2 name: "gpuservice_sources",
3 srcs: [
4 "GpuService.cpp",
Yiwei Zhang2d4c1882019-02-24 22:28:08 -08005 "gpustats/GpuStats.cpp"
Peiyong Lin2da74652018-11-01 10:34:57 -07006 ],
7}
8
9filegroup {
10 name: "gpuservice_binary_sources",
11 srcs: ["main_gpuservice.cpp"],
12}
13
14cc_defaults {
15 name: "gpuservice_defaults",
16 cflags: [
17 "-DLOG_TAG=\"GpuService\"",
18 "-Wall",
19 "-Werror",
20 "-Wformat",
21 "-Wthread-safety",
22 "-Wunused",
23 "-Wunreachable-code",
24 ],
Peiyong Lin2da74652018-11-01 10:34:57 -070025 srcs: [
26 ":gpuservice_sources",
27 ],
28 include_dirs: [
29 "frameworks/native/vulkan/vkjson",
30 "frameworks/native/vulkan/include",
31 ],
32 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080033 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070034 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080035 "libcutils",
36 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070037 "liblog",
38 "libutils",
39 "libvulkan",
40 ],
41 static_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080042 "libserviceutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070043 "libvkjson",
44 ],
45}
46
47cc_defaults {
48 name: "gpuservice_production_defaults",
49 defaults: ["gpuservice_defaults"],
50 cflags: [
51 "-fvisibility=hidden",
52 "-fwhole-program-vtables", // requires ThinLTO
53 ],
54 lto: {
55 thin: true,
56 },
57}
58
59cc_defaults {
60 name: "gpuservice_binary",
61 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070062 shared_libs: [
63 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080064 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070065 "liblog",
66 "libutils",
67 ],
68 ldflags: ["-Wl,--export-dynamic"],
69}
70
71cc_binary {
72 name: "gpuservice",
73 defaults: ["gpuservice_binary"],
74 init_rc: ["gpuservice.rc"],
75 srcs: [":gpuservice_binary_sources"],
76}