blob: b9b6a1960646b11ce0d8241ad28b33ec89b7b57d [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",
Adithya Srinivasanb9f62d62020-06-18 11:28:12 -070034 "libgpumemtracer",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080035 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070036 "liblog",
37 "libutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080038 "libvkjson",
Peiyong Lin2da74652018-11-01 10:34:57 -070039 ],
40 static_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080041 "libserviceutils",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080042 ],
43 export_static_lib_headers: [
44 "libserviceutils",
45 ],
46 export_shared_lib_headers: [
47 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070048 ],
49}
50
51cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080052 name: "libgpuservice_production_defaults",
53 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070054 cflags: [
55 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070056 ],
57 lto: {
58 thin: true,
59 },
Yi Kongbf2aa782020-09-21 01:25:16 +080060 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070061}
62
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080063filegroup {
64 name: "libgpuservice_sources",
65 srcs: [
66 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080067 ],
68}
69
70cc_library_shared {
71 name: "libgpuservice",
72 defaults: ["libgpuservice_production_defaults"],
73 srcs: [
74 ":libgpuservice_sources",
75 ],
76}
77
Peiyong Lin2da74652018-11-01 10:34:57 -070078cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080079 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070080 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070081 shared_libs: [
82 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080083 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070084 "liblog",
85 "libutils",
86 ],
87 ldflags: ["-Wl,--export-dynamic"],
88}
89
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080090filegroup {
91 name: "gpuservice_binary_sources",
92 srcs: ["main_gpuservice.cpp"],
93}
94
Peiyong Lin2da74652018-11-01 10:34:57 -070095cc_binary {
96 name: "gpuservice",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080097 defaults: ["libgpuservice_binary"],
Peiyong Lin2da74652018-11-01 10:34:57 -070098 init_rc: ["gpuservice.rc"],
Yiwei Zhang252e5f62020-02-19 15:44:17 -080099 required: [
100 "bpfloader",
101 "gpu_mem.o",
102 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700103 srcs: [":gpuservice_binary_sources"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800104 shared_libs: [
105 "libgpuservice",
106 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700107}