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