blob: 74e354f09c62079975680276ed89bb4030e9278e [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: [
Tim Van Patten1af4e872025-01-13 10:31:34 -070042 "aconfig_lib_cc_static_link.defaults",
Devin Moorec032c372023-05-24 22:05:47 +000043 "gpuservice_defaults",
Tim Van Patten8e518c02025-01-10 17:30:30 -070044 "libfeatureoverride_deps",
Devin Moorec032c372023-05-24 22:05:47 +000045 "libgfxstats_deps",
46 "libgpumem_deps",
47 "libgpumemtracer_deps",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000048 "libvkjson_deps",
49 "libvkprofiles_deps",
Devin Moorec032c372023-05-24 22:05:47 +000050 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080051 cflags: [
52 "-DLOG_TAG=\"GpuService\"",
Peiyong Lin2da74652018-11-01 10:34:57 -070053 ],
54 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080055 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070056 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080057 "libcutils",
Paul Thomsonf44c6b82021-12-01 13:53:58 +000058 "libgpuwork",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080059 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070060 "liblog",
61 "libutils",
Tim Van Patten8e518c02025-01-10 17:30:30 -070062 "server_configurable_flags",
Peiyong Lin2da74652018-11-01 10:34:57 -070063 ],
64 static_libs: [
Tim Van Patten8e518c02025-01-10 17:30:30 -070065 "gpuservice_flags_c_lib",
66 "libfeatureoverride",
Devin Moorec032c372023-05-24 22:05:47 +000067 "libgfxstats",
68 "libgpumem",
69 "libgpumemtracer",
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080070 "libserviceutils",
Devin Moorec032c372023-05-24 22:05:47 +000071 "libvkjson",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000072 "libvkprofiles",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080073 ],
74 export_static_lib_headers: [
75 "libserviceutils",
76 ],
77 export_shared_lib_headers: [
78 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070079 ],
80}
81
82cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080083 name: "libgpuservice_production_defaults",
84 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070085 cflags: [
86 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070087 ],
88 lto: {
89 thin: true,
90 },
Yi Kongbf2aa782020-09-21 01:25:16 +080091 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070092}
93
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080094filegroup {
95 name: "libgpuservice_sources",
96 srcs: [
97 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080098 ],
99}
100
Devin Moorec032c372023-05-24 22:05:47 +0000101cc_library_static {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800102 name: "libgpuservice",
103 defaults: ["libgpuservice_production_defaults"],
sergiuferentz3c00cbc2023-06-26 18:01:47 +0000104 export_include_dirs: ["include"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800105 srcs: [
106 ":libgpuservice_sources",
107 ],
Yuxin Hua10520d2025-01-16 02:30:53 +0000108 shared_libs: [
109 "gpuservice_multiuser_flags_c_lib",
110 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800111}
112
Peiyong Lin2da74652018-11-01 10:34:57 -0700113cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800114 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -0700115 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -0700116 shared_libs: [
117 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -0800118 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -0700119 "liblog",
120 "libutils",
121 ],
122 ldflags: ["-Wl,--export-dynamic"],
123}
124
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800125filegroup {
126 name: "gpuservice_binary_sources",
127 srcs: ["main_gpuservice.cpp"],
128}
129
Peiyong Lin2da74652018-11-01 10:34:57 -0700130cc_binary {
131 name: "gpuservice",
Devin Moorec032c372023-05-24 22:05:47 +0000132 defaults: [
133 "libgpuservice_binary",
134 "libgpuservice_production_defaults",
135 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700136 init_rc: ["gpuservice.rc"],
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800137 required: [
138 "bpfloader",
Ken Chen440cf722022-07-08 19:08:48 +0800139 "gpuMem.o",
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800140 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700141 srcs: [":gpuservice_binary_sources"],
Devin Moorec032c372023-05-24 22:05:47 +0000142 static_libs: [
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800143 "libgpuservice",
144 ],
Yuxin Hua10520d2025-01-16 02:30:53 +0000145 shared_libs: [
146 "gpuservice_multiuser_flags_c_lib",
147 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700148}