blob: ca9fe5ea431c824de603523b68dccd510187accf [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",
Devin Moorec032c372023-05-24 22:05:47 +000024 defaults: [
25 "gpuservice_defaults",
Devin Moorec032c372023-05-24 22:05:47 +000026 "libgfxstats_deps",
27 "libgpumem_deps",
28 "libgpumemtracer_deps",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000029 "libvkjson_deps",
30 "libvkprofiles_deps",
Devin Moorec032c372023-05-24 22:05:47 +000031 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080032 cflags: [
33 "-DLOG_TAG=\"GpuService\"",
Peiyong Lin2da74652018-11-01 10:34:57 -070034 ],
35 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080036 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070037 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080038 "libcutils",
Paul Thomsonf44c6b82021-12-01 13:53:58 +000039 "libgpuwork",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080040 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070041 "liblog",
42 "libutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070043 ],
44 static_libs: [
Devin Moorec032c372023-05-24 22:05:47 +000045 "libgfxstats",
46 "libgpumem",
47 "libgpumemtracer",
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080048 "libserviceutils",
Devin Moorec032c372023-05-24 22:05:47 +000049 "libvkjson",
Trevor David Blackf2b7c862024-02-15 23:12:22 +000050 "libvkprofiles",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080051 ],
52 export_static_lib_headers: [
53 "libserviceutils",
54 ],
55 export_shared_lib_headers: [
56 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070057 ],
58}
59
60cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080061 name: "libgpuservice_production_defaults",
62 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070063 cflags: [
64 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070065 ],
66 lto: {
67 thin: true,
68 },
Yi Kongbf2aa782020-09-21 01:25:16 +080069 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070070}
71
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080072filegroup {
73 name: "libgpuservice_sources",
74 srcs: [
75 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080076 ],
77}
78
Devin Moorec032c372023-05-24 22:05:47 +000079cc_library_static {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080080 name: "libgpuservice",
81 defaults: ["libgpuservice_production_defaults"],
sergiuferentz3c00cbc2023-06-26 18:01:47 +000082 export_include_dirs: ["include"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080083 srcs: [
84 ":libgpuservice_sources",
85 ],
86}
87
Peiyong Lin2da74652018-11-01 10:34:57 -070088cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080089 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070090 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070091 shared_libs: [
92 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080093 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070094 "liblog",
95 "libutils",
96 ],
97 ldflags: ["-Wl,--export-dynamic"],
98}
99
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800100filegroup {
101 name: "gpuservice_binary_sources",
102 srcs: ["main_gpuservice.cpp"],
103}
104
Peiyong Lin2da74652018-11-01 10:34:57 -0700105cc_binary {
106 name: "gpuservice",
Devin Moorec032c372023-05-24 22:05:47 +0000107 defaults: [
108 "libgpuservice_binary",
109 "libgpuservice_production_defaults",
110 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700111 init_rc: ["gpuservice.rc"],
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800112 required: [
113 "bpfloader",
Ken Chen440cf722022-07-08 19:08:48 +0800114 "gpuMem.o",
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800115 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700116 srcs: [":gpuservice_binary_sources"],
Devin Moorec032c372023-05-24 22:05:47 +0000117 static_libs: [
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800118 "libgpuservice",
119 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700120}