blob: 052efb6bbb8383a43f300c4c7f78de7b0a991758 [file] [log] [blame]
Bob Badour3306e492021-02-25 15:35:37 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_native_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_native_license"],
8}
9
Peiyong Lin2da74652018-11-01 10:34:57 -070010cc_defaults {
11 name: "gpuservice_defaults",
12 cflags: [
Peiyong Lin2da74652018-11-01 10:34:57 -070013 "-Wall",
14 "-Werror",
15 "-Wformat",
16 "-Wthread-safety",
17 "-Wunused",
18 "-Wunreachable-code",
19 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080020}
21
22cc_defaults {
23 name: "libgpuservice_defaults",
24 defaults: ["gpuservice_defaults"],
25 cflags: [
26 "-DLOG_TAG=\"GpuService\"",
Peiyong Lin2da74652018-11-01 10:34:57 -070027 ],
28 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080029 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070030 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080031 "libcutils",
Yiwei Zhangbaaef882020-02-02 17:45:30 -080032 "libgfxstats",
Yiwei Zhang252e5f62020-02-19 15:44:17 -080033 "libgpumem",
Paul Thomsonf44c6b82021-12-01 13:53:58 +000034 "libgpuwork",
Adithya Srinivasanb9f62d62020-06-18 11:28:12 -070035 "libgpumemtracer",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080036 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070037 "liblog",
38 "libutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080039 "libvkjson",
Peiyong Lin2da74652018-11-01 10:34:57 -070040 ],
41 static_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080042 "libserviceutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080043 ],
44 export_static_lib_headers: [
45 "libserviceutils",
46 ],
47 export_shared_lib_headers: [
48 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070049 ],
50}
51
52cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080053 name: "libgpuservice_production_defaults",
54 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070055 cflags: [
56 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070057 ],
58 lto: {
59 thin: true,
60 },
Yi Kongbf2aa782020-09-21 01:25:16 +080061 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070062}
63
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080064filegroup {
65 name: "libgpuservice_sources",
66 srcs: [
67 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080068 ],
69}
70
71cc_library_shared {
72 name: "libgpuservice",
73 defaults: ["libgpuservice_production_defaults"],
sergiuferentz3c00cbc2023-06-26 18:01:47 +000074 export_include_dirs: ["include"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080075 srcs: [
76 ":libgpuservice_sources",
77 ],
78}
79
Peiyong Lin2da74652018-11-01 10:34:57 -070080cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080081 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070082 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070083 shared_libs: [
84 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080085 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070086 "liblog",
87 "libutils",
88 ],
89 ldflags: ["-Wl,--export-dynamic"],
90}
91
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080092filegroup {
93 name: "gpuservice_binary_sources",
94 srcs: ["main_gpuservice.cpp"],
95}
96
Peiyong Lin2da74652018-11-01 10:34:57 -070097cc_binary {
98 name: "gpuservice",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080099 defaults: ["libgpuservice_binary"],
Peiyong Lin2da74652018-11-01 10:34:57 -0700100 init_rc: ["gpuservice.rc"],
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800101 required: [
102 "bpfloader",
Ken Chen440cf722022-07-08 19:08:48 +0800103 "gpuMem.o",
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800104 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700105 srcs: [":gpuservice_binary_sources"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800106 shared_libs: [
107 "libgpuservice",
108 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700109}