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