• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
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
10cc_defaults {
11    name: "gpuservice_defaults",
12    cflags: [
13        "-Wall",
14        "-Werror",
15        "-Wformat",
16        "-Wthread-safety",
17        "-Wunused",
18        "-Wunreachable-code",
19    ],
20}
21
22cc_defaults {
23    name: "libgpuservice_defaults",
24    defaults: ["gpuservice_defaults"],
25    cflags: [
26        "-DLOG_TAG=\"GpuService\"",
27    ],
28    shared_libs: [
29        "libbase",
30        "libbinder",
31        "libcutils",
32        "libgfxstats",
33        "libgpumem",
34        "libgpumemtracer",
35        "libgraphicsenv",
36        "liblog",
37        "libutils",
38        "libvkjson",
39    ],
40    static_libs: [
41        "libserviceutils",
42    ],
43    export_static_lib_headers: [
44        "libserviceutils",
45    ],
46    export_shared_lib_headers: [
47        "libgraphicsenv",
48    ],
49}
50
51cc_defaults {
52    name: "libgpuservice_production_defaults",
53    defaults: ["libgpuservice_defaults"],
54    cflags: [
55        "-fvisibility=hidden",
56    ],
57    lto: {
58        thin: true,
59    },
60    whole_program_vtables: true, // Requires ThinLTO
61}
62
63filegroup {
64    name: "libgpuservice_sources",
65    srcs: [
66        "GpuService.cpp",
67    ],
68}
69
70cc_library_shared {
71    name: "libgpuservice",
72    defaults: ["libgpuservice_production_defaults"],
73    srcs: [
74        ":libgpuservice_sources",
75    ],
76}
77
78cc_defaults {
79    name: "libgpuservice_binary",
80    defaults: ["gpuservice_defaults"],
81    shared_libs: [
82        "libbinder",
83        "libcutils",
84        "liblog",
85        "libutils",
86    ],
87    ldflags: ["-Wl,--export-dynamic"],
88}
89
90filegroup {
91    name: "gpuservice_binary_sources",
92    srcs: ["main_gpuservice.cpp"],
93}
94
95cc_binary {
96    name: "gpuservice",
97    defaults: ["libgpuservice_binary"],
98    init_rc: ["gpuservice.rc"],
99    required: [
100        "bpfloader",
101        "gpu_mem.o",
102    ],
103    srcs: [":gpuservice_binary_sources"],
104    shared_libs: [
105        "libgpuservice",
106    ],
107}
108