Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 1 | package { |
| 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 Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 10 | cc_defaults { |
| 11 | name: "gpuservice_defaults", |
| 12 | cflags: [ |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 13 | "-Wall", |
| 14 | "-Werror", |
| 15 | "-Wformat", |
| 16 | "-Wthread-safety", |
| 17 | "-Wunused", |
| 18 | "-Wunreachable-code", |
| 19 | ], |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 20 | } |
| 21 | |
Tim Van Patten | 8e518c0 | 2025-01-10 17:30:30 -0700 | [diff] [blame^] | 22 | cc_aconfig_library { |
| 23 | name: "gpuservice_flags_c_lib", |
| 24 | aconfig_declarations: "graphicsenv_flags", |
| 25 | } |
| 26 | |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 27 | cc_defaults { |
| 28 | name: "libgpuservice_defaults", |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 29 | defaults: [ |
| 30 | "gpuservice_defaults", |
Tim Van Patten | 8e518c0 | 2025-01-10 17:30:30 -0700 | [diff] [blame^] | 31 | "libfeatureoverride_deps", |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 32 | "libgfxstats_deps", |
| 33 | "libgpumem_deps", |
| 34 | "libgpumemtracer_deps", |
Trevor David Black | f2b7c86 | 2024-02-15 23:12:22 +0000 | [diff] [blame] | 35 | "libvkjson_deps", |
| 36 | "libvkprofiles_deps", |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 37 | ], |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 38 | cflags: [ |
| 39 | "-DLOG_TAG=\"GpuService\"", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 40 | ], |
| 41 | shared_libs: [ |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 42 | "libbase", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 43 | "libbinder", |
Yiwei Zhang | cb9d4e4 | 2019-02-06 20:22:59 -0800 | [diff] [blame] | 44 | "libcutils", |
Paul Thomson | f44c6b8 | 2021-12-01 13:53:58 +0000 | [diff] [blame] | 45 | "libgpuwork", |
Yiwei Zhang | cb9d4e4 | 2019-02-06 20:22:59 -0800 | [diff] [blame] | 46 | "libgraphicsenv", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 47 | "liblog", |
| 48 | "libutils", |
Tim Van Patten | 8e518c0 | 2025-01-10 17:30:30 -0700 | [diff] [blame^] | 49 | "server_configurable_flags", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 50 | ], |
| 51 | static_libs: [ |
Tim Van Patten | 8e518c0 | 2025-01-10 17:30:30 -0700 | [diff] [blame^] | 52 | "gpuservice_flags_c_lib", |
| 53 | "libfeatureoverride", |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 54 | "libgfxstats", |
| 55 | "libgpumem", |
| 56 | "libgpumemtracer", |
Yiwei Zhang | bb4eaf6 | 2019-02-23 17:53:27 -0800 | [diff] [blame] | 57 | "libserviceutils", |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 58 | "libvkjson", |
Trevor David Black | f2b7c86 | 2024-02-15 23:12:22 +0000 | [diff] [blame] | 59 | "libvkprofiles", |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 60 | ], |
| 61 | export_static_lib_headers: [ |
| 62 | "libserviceutils", |
| 63 | ], |
| 64 | export_shared_lib_headers: [ |
| 65 | "libgraphicsenv", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 66 | ], |
| 67 | } |
| 68 | |
| 69 | cc_defaults { |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 70 | name: "libgpuservice_production_defaults", |
| 71 | defaults: ["libgpuservice_defaults"], |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 72 | cflags: [ |
| 73 | "-fvisibility=hidden", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 74 | ], |
| 75 | lto: { |
| 76 | thin: true, |
| 77 | }, |
Yi Kong | bf2aa78 | 2020-09-21 01:25:16 +0800 | [diff] [blame] | 78 | whole_program_vtables: true, // Requires ThinLTO |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 79 | } |
| 80 | |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 81 | filegroup { |
| 82 | name: "libgpuservice_sources", |
| 83 | srcs: [ |
| 84 | "GpuService.cpp", |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 85 | ], |
| 86 | } |
| 87 | |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 88 | cc_library_static { |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 89 | name: "libgpuservice", |
| 90 | defaults: ["libgpuservice_production_defaults"], |
sergiuferentz | 3c00cbc | 2023-06-26 18:01:47 +0000 | [diff] [blame] | 91 | export_include_dirs: ["include"], |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 92 | srcs: [ |
| 93 | ":libgpuservice_sources", |
| 94 | ], |
| 95 | } |
| 96 | |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 97 | cc_defaults { |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 98 | name: "libgpuservice_binary", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 99 | defaults: ["gpuservice_defaults"], |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 100 | shared_libs: [ |
| 101 | "libbinder", |
Yiwei Zhang | cb9d4e4 | 2019-02-06 20:22:59 -0800 | [diff] [blame] | 102 | "libcutils", |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 103 | "liblog", |
| 104 | "libutils", |
| 105 | ], |
| 106 | ldflags: ["-Wl,--export-dynamic"], |
| 107 | } |
| 108 | |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 109 | filegroup { |
| 110 | name: "gpuservice_binary_sources", |
| 111 | srcs: ["main_gpuservice.cpp"], |
| 112 | } |
| 113 | |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 114 | cc_binary { |
| 115 | name: "gpuservice", |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 116 | defaults: [ |
| 117 | "libgpuservice_binary", |
| 118 | "libgpuservice_production_defaults", |
| 119 | ], |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 120 | init_rc: ["gpuservice.rc"], |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 121 | required: [ |
| 122 | "bpfloader", |
Ken Chen | 440cf72 | 2022-07-08 19:08:48 +0800 | [diff] [blame] | 123 | "gpuMem.o", |
Yiwei Zhang | 252e5f6 | 2020-02-19 15:44:17 -0800 | [diff] [blame] | 124 | ], |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 125 | srcs: [":gpuservice_binary_sources"], |
Devin Moore | c032c37 | 2023-05-24 22:05:47 +0000 | [diff] [blame] | 126 | static_libs: [ |
Yiwei Zhang | 5de3ce6 | 2019-11-26 11:06:18 -0800 | [diff] [blame] | 127 | "libgpuservice", |
| 128 | ], |
Peiyong Lin | 2da7465 | 2018-11-01 10:34:57 -0700 | [diff] [blame] | 129 | } |