blob: 689221f4af7bd55f7ecc481b90e6fe7d18af4bc4 [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
Tim Van Patten8e518c02025-01-10 17:30:30 -070022cc_aconfig_library {
23 name: "gpuservice_flags_c_lib",
24 aconfig_declarations: "graphicsenv_flags",
25}
26
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080027cc_defaults {
28 name: "libgpuservice_defaults",
Devin Moorec032c372023-05-24 22:05:47 +000029 defaults: [
30 "gpuservice_defaults",
Tim Van Patten8e518c02025-01-10 17:30:30 -070031 "libfeatureoverride_deps",
Devin Moorec032c372023-05-24 22:05:47 +000032 "libgfxstats_deps",
33 "libgpumem_deps",
34 "libgpumemtracer_deps",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000035 "libvkjson_deps",
36 "libvkprofiles_deps",
Devin Moorec032c372023-05-24 22:05:47 +000037 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080038 cflags: [
39 "-DLOG_TAG=\"GpuService\"",
Peiyong Lin2da74652018-11-01 10:34:57 -070040 ],
41 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080042 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070043 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080044 "libcutils",
Paul Thomsonf44c6b82021-12-01 13:53:58 +000045 "libgpuwork",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080046 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070047 "liblog",
48 "libutils",
Tim Van Patten8e518c02025-01-10 17:30:30 -070049 "server_configurable_flags",
Peiyong Lin2da74652018-11-01 10:34:57 -070050 ],
51 static_libs: [
Tim Van Patten8e518c02025-01-10 17:30:30 -070052 "gpuservice_flags_c_lib",
53 "libfeatureoverride",
Devin Moorec032c372023-05-24 22:05:47 +000054 "libgfxstats",
55 "libgpumem",
56 "libgpumemtracer",
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080057 "libserviceutils",
Devin Moorec032c372023-05-24 22:05:47 +000058 "libvkjson",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000059 "libvkprofiles",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080060 ],
61 export_static_lib_headers: [
62 "libserviceutils",
63 ],
64 export_shared_lib_headers: [
65 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070066 ],
67}
68
69cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080070 name: "libgpuservice_production_defaults",
71 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070072 cflags: [
73 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070074 ],
75 lto: {
76 thin: true,
77 },
Yi Kongbf2aa782020-09-21 01:25:16 +080078 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070079}
80
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080081filegroup {
82 name: "libgpuservice_sources",
83 srcs: [
84 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080085 ],
86}
87
Devin Moorec032c372023-05-24 22:05:47 +000088cc_library_static {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080089 name: "libgpuservice",
90 defaults: ["libgpuservice_production_defaults"],
sergiuferentz3c00cbc2023-06-26 18:01:47 +000091 export_include_dirs: ["include"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080092 srcs: [
93 ":libgpuservice_sources",
94 ],
95}
96
Peiyong Lin2da74652018-11-01 10:34:57 -070097cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080098 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070099 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -0700100 shared_libs: [
101 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -0800102 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -0700103 "liblog",
104 "libutils",
105 ],
106 ldflags: ["-Wl,--export-dynamic"],
107}
108
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800109filegroup {
110 name: "gpuservice_binary_sources",
111 srcs: ["main_gpuservice.cpp"],
112}
113
Peiyong Lin2da74652018-11-01 10:34:57 -0700114cc_binary {
115 name: "gpuservice",
Devin Moorec032c372023-05-24 22:05:47 +0000116 defaults: [
117 "libgpuservice_binary",
118 "libgpuservice_production_defaults",
119 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700120 init_rc: ["gpuservice.rc"],
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800121 required: [
122 "bpfloader",
Ken Chen440cf722022-07-08 19:08:48 +0800123 "gpuMem.o",
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800124 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700125 srcs: [":gpuservice_binary_sources"],
Devin Moorec032c372023-05-24 22:05:47 +0000126 static_libs: [
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800127 "libgpuservice",
128 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700129}