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