blob: e5b1e44b440e171877064a139b9f6893459b1816 [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",
26 "libvkjson_deps",
27 "libgfxstats_deps",
28 "libgpumem_deps",
29 "libgpumemtracer_deps",
30 ],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080031 cflags: [
32 "-DLOG_TAG=\"GpuService\"",
Peiyong Lin2da74652018-11-01 10:34:57 -070033 ],
34 shared_libs: [
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080035 "libbase",
Peiyong Lin2da74652018-11-01 10:34:57 -070036 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080037 "libcutils",
Paul Thomsonf44c6b82021-12-01 13:53:58 +000038 "libgpuwork",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080039 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070040 "liblog",
41 "libutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070042 ],
43 static_libs: [
Devin Moorec032c372023-05-24 22:05:47 +000044 "libgfxstats",
45 "libgpumem",
46 "libgpumemtracer",
Yiwei Zhangbb4eaf62019-02-23 17:53:27 -080047 "libserviceutils",
Devin Moorec032c372023-05-24 22:05:47 +000048 "libvkjson",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080049 ],
50 export_static_lib_headers: [
51 "libserviceutils",
52 ],
53 export_shared_lib_headers: [
54 "libgraphicsenv",
Peiyong Lin2da74652018-11-01 10:34:57 -070055 ],
56}
57
58cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080059 name: "libgpuservice_production_defaults",
60 defaults: ["libgpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070061 cflags: [
62 "-fvisibility=hidden",
Peiyong Lin2da74652018-11-01 10:34:57 -070063 ],
64 lto: {
65 thin: true,
66 },
Yi Kongbf2aa782020-09-21 01:25:16 +080067 whole_program_vtables: true, // Requires ThinLTO
Peiyong Lin2da74652018-11-01 10:34:57 -070068}
69
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080070filegroup {
71 name: "libgpuservice_sources",
72 srcs: [
73 "GpuService.cpp",
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080074 ],
75}
76
Devin Moorec032c372023-05-24 22:05:47 +000077cc_library_static {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080078 name: "libgpuservice",
79 defaults: ["libgpuservice_production_defaults"],
sergiuferentz3c00cbc2023-06-26 18:01:47 +000080 export_include_dirs: ["include"],
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080081 srcs: [
82 ":libgpuservice_sources",
83 ],
84}
85
Peiyong Lin2da74652018-11-01 10:34:57 -070086cc_defaults {
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080087 name: "libgpuservice_binary",
Peiyong Lin2da74652018-11-01 10:34:57 -070088 defaults: ["gpuservice_defaults"],
Peiyong Lin2da74652018-11-01 10:34:57 -070089 shared_libs: [
90 "libbinder",
Yiwei Zhangcb9d4e42019-02-06 20:22:59 -080091 "libcutils",
Peiyong Lin2da74652018-11-01 10:34:57 -070092 "liblog",
93 "libutils",
94 ],
95 ldflags: ["-Wl,--export-dynamic"],
96}
97
Yiwei Zhang5de3ce62019-11-26 11:06:18 -080098filegroup {
99 name: "gpuservice_binary_sources",
100 srcs: ["main_gpuservice.cpp"],
101}
102
Peiyong Lin2da74652018-11-01 10:34:57 -0700103cc_binary {
104 name: "gpuservice",
Devin Moorec032c372023-05-24 22:05:47 +0000105 defaults: [
106 "libgpuservice_binary",
107 "libgpuservice_production_defaults",
108 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700109 init_rc: ["gpuservice.rc"],
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800110 required: [
111 "bpfloader",
Ken Chen440cf722022-07-08 19:08:48 +0800112 "gpuMem.o",
Yiwei Zhang252e5f62020-02-19 15:44:17 -0800113 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700114 srcs: [":gpuservice_binary_sources"],
Devin Moorec032c372023-05-24 22:05:47 +0000115 static_libs: [
Yiwei Zhang5de3ce62019-11-26 11:06:18 -0800116 "libgpuservice",
117 ],
Peiyong Lin2da74652018-11-01 10:34:57 -0700118}