blob: 01287b08f4c77b4cddfe80496d3490123a1d4f60 [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
Yuxin Hua10520d2025-01-16 02:30:53 +000010aconfig_declarations {
11 name: "gpuservice_flags",
12 package: "com.android.frameworks.gpuservice.flags",
13 container: "system",
14 srcs: ["gpuservice_flags.aconfig"],
15}
16
Peiyong Lin2da74652018-11-01 10:34:57 -070017cc_defaults {
18 name: "gpuservice_defaults",
19 cflags: [
Peiyong Lin2da74652018-11-01 10:34:57 -070020 "-Wall",
21 "-Werror",
22 "-Wformat",
23 "-Wthread-safety",
24 "-Wunused",
25 "-Wunreachable-code",
26 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080027}
28
Tim Van Patten8e518c02025-01-10 17:30:30 -070029cc_aconfig_library {
Yuxin Hua10520d2025-01-16 02:30:53 +000030 name: "gpuservice_multiuser_flags_c_lib",
31 aconfig_declarations: "gpuservice_flags",
32}
33
34cc_aconfig_library {
Tim Van Patten8e518c02025-01-10 17:30:30 -070035 name: "gpuservice_flags_c_lib",
36 aconfig_declarations: "graphicsenv_flags",
37}
38
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080039cc_defaults {
40 name: "libgpuservice_defaults",
Devin Moorec032c372023-05-24 22:05:47 +000041 defaults: [
42 "gpuservice_defaults",
Tim Van Patten8e518c02025-01-10 17:30:30 -070043 "libfeatureoverride_deps",
Devin Moorec032c372023-05-24 22:05:47 +000044 "libgfxstats_deps",
45 "libgpumem_deps",
46 "libgpumemtracer_deps",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000047 "libvkjson_deps",
48 "libvkprofiles_deps",
Devin Moorec032c372023-05-24 22:05:47 +000049 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080050 cflags: [
51 "-DLOG_TAG=\"GpuService\"",
Peiyong Lin2da74652018-11-01 10:34:57 -070052 ],
53 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080054 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070055 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080056 "libcutils",
Paul Thomsonf44c6b82021-12-01 13:53:58 +000057 "libgpuwork",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080058 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070059 "liblog",
60 "libutils",
Tim Van Patten8e518c02025-01-10 17:30:30 -070061 "server_configurable_flags",
Peiyong Lin2da74652018-11-01 10:34:57 -070062 ],
63 static_libs: [
Tim Van Patten8e518c02025-01-10 17:30:30 -070064 "gpuservice_flags_c_lib",
65 "libfeatureoverride",
Devin Moorec032c372023-05-24 22:05:47 +000066 "libgfxstats",
67 "libgpumem",
68 "libgpumemtracer",
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080069 "libserviceutils",
Devin Moorec032c372023-05-24 22:05:47 +000070 "libvkjson",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000071 "libvkprofiles",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080072 ],
73 export_static_lib_headers: [
74 "libserviceutils",
75 ],
76 export_shared_lib_headers: [
77 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070078 ],
79}
80
81cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080082 name: "libgpuservice_production_defaults",
83 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070084 cflags: [
85 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070086 ],
87 lto: {
88 thin: true,
89 },
Yi Kongbf2aa782020-09-21 01:25:16 +080090 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070091}
92
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080093filegroup {
94 name: "libgpuservice_sources",
95 srcs: [
96 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080097 ],
98}
99
Devin Moorec032c372023-05-24 22:05:47 +0000100cc_library_static {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800101 name: "libgpuservice",
102 defaults: ["libgpuservice_production_defaults"],
sergiuferentz3c00cbc2023-06-26 18:01:47 +0000103 export_include_dirs: ["include"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800104 srcs: [
105 ":libgpuservice_sources",
106 ],
Yuxin Hua10520d2025-01-16 02:30:53 +0000107 shared_libs: [
108 "gpuservice_multiuser_flags_c_lib",
109 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800110}
111
Peiyong Lin2da74652018-11-01 10:34:57 -0700112cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800113 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -0700114 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -0700115 shared_libs: [
116 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -0800117 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -0700118 "liblog",
119 "libutils",
120 ],
121 ldflags: ["-Wl,--export-dynamic"],
122}
123
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800124filegroup {
125 name: "gpuservice_binary_sources",
126 srcs: ["main_gpuservice.cpp"],
127}
128
Peiyong Lin2da74652018-11-01 10:34:57 -0700129cc_binary {
130 name: "gpuservice",
Devin Moorec032c372023-05-24 22:05:47 +0000131 defaults: [
132 "libgpuservice_binary",
133 "libgpuservice_production_defaults",
134 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700135 init_rc: ["gpuservice.rc"],
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800136 required: [
137 "bpfloader",
Ken Chen440cf722022-07-08 19:08:48 +0800138 "gpuMem.o",
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800139 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700140 srcs: [":gpuservice_binary_sources"],
Devin Moorec032c372023-05-24 22:05:47 +0000141 static_libs: [
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800142 "libgpuservice",
143 ],
Yuxin Hua10520d2025-01-16 02:30:53 +0000144 shared_libs: [
145 "gpuservice_multiuser_flags_c_lib",
146 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700147}