Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 1 | // Copyright 2017 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "frameworks_av_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["frameworks_av_license"], |
| 22 | } |
| 23 | |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "libmediautils_defaults", |
| 26 | cflags: [ |
| 27 | "-Wall", |
| 28 | "-Werror", |
| 29 | "-Wextra", |
| 30 | ], |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 31 | sanitize: { |
| 32 | cfi: true, |
| 33 | integer_overflow: true, |
| 34 | }, |
| 35 | target: { |
| 36 | host: { |
| 37 | sanitize: { |
| 38 | cfi: false, |
| 39 | }, |
| 40 | }, |
| 41 | }, |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 42 | } |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 43 | |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 44 | filegroup { |
| 45 | name: "libmediautils_core_srcs", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 46 | srcs: [ |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 47 | "AImageReaderUtils.cpp", |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 48 | "BatteryNotifier.cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 49 | "ISchedulingPolicyService.cpp", |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 50 | "Library.cpp", |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 51 | "MediaUtilsDelayed.cpp", |
Andy Hung | 224f82f | 2022-03-22 00:00:49 -0700 | [diff] [blame] | 52 | "MethodStatistics.cpp", |
Andy Hung | afc51db | 2022-04-08 17:33:40 -0700 | [diff] [blame] | 53 | "Process.cpp", |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 54 | "ProcessInfo.cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 55 | "SchedulingPolicyService.cpp", |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 56 | "ServiceUtilities.cpp", |
Andy Hung | 44d648b | 2022-04-08 17:33:40 -0700 | [diff] [blame] | 57 | "ThreadSnapshot.cpp", |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 58 | "TimeCheck.cpp", |
| 59 | "TimerThread.cpp", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 60 | ], |
| 61 | } |
| 62 | |
| 63 | cc_library_headers { |
| 64 | name: "libmediautils_headers", |
| 65 | host_supported: true, |
| 66 | vendor_available: true, // required for platform/hardware/interfaces |
| 67 | shared_libs: [ |
| 68 | "liblog", |
| 69 | ], |
| 70 | local_include_dirs: ["include"], |
| 71 | export_include_dirs: ["include"], |
| 72 | } |
| 73 | |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 74 | |
| 75 | cc_library { |
| 76 | name: "libmediautils", |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 77 | host_supported: true, |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 78 | defaults: ["libmediautils_defaults"], |
| 79 | srcs: [ |
| 80 | ":libmediautils_core_srcs", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 81 | ], |
Colin Cross | d8e3af0 | 2019-05-17 13:28:13 -0700 | [diff] [blame] | 82 | static_libs: [ |
Steven Moreland | 3696000 | 2021-04-01 00:08:45 +0000 | [diff] [blame] | 83 | "libbatterystats_aidl", |
Steven Moreland | 886d732 | 2021-04-02 04:19:45 +0000 | [diff] [blame] | 84 | "libprocessinfoservice_aidl", |
Colin Cross | d8e3af0 | 2019-05-17 13:28:13 -0700 | [diff] [blame] | 85 | ], |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 86 | shared_libs: [ |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 87 | "libaudioclient_aidl_conversion", |
Andy Hung | c747c53 | 2022-03-07 21:41:14 -0800 | [diff] [blame] | 88 | "libaudioutils", // for clock.h, Statistics.h |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 89 | "libbase", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 90 | "libbinder", |
Jeffrey Carlyle | 62cc92b | 2019-09-17 11:15:15 -0700 | [diff] [blame] | 91 | "libcutils", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 92 | "libhidlbase", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 93 | "liblog", |
Svet Ganov | 3376113 | 2021-05-13 22:51:08 +0000 | [diff] [blame] | 94 | "libpermission", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 95 | "libutils", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 96 | "android.hardware.graphics.bufferqueue@1.0", |
| 97 | "android.hidl.token@1.0-utils", |
Samiul Islam | acb722d | 2021-08-26 11:41:21 +0100 | [diff] [blame] | 98 | "packagemanager_aidl-cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 99 | ], |
Steven Moreland | 3696000 | 2021-04-01 00:08:45 +0000 | [diff] [blame] | 100 | export_static_lib_headers: [ |
| 101 | "libbatterystats_aidl", |
| 102 | ], |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 103 | |
Eric Laurent | 39b09b5 | 2018-06-29 12:24:40 -0700 | [diff] [blame] | 104 | logtags: ["EventLogTags.logtags"], |
| 105 | |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 106 | export_shared_lib_headers: [ |
Svet Ganov | 3376113 | 2021-05-13 22:51:08 +0000 | [diff] [blame] | 107 | "libpermission", |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 108 | ], |
| 109 | |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 110 | required: [ |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 111 | "libmediautils_delayed", // lazy loaded |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 112 | ], |
| 113 | |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 114 | target: { |
| 115 | android: { |
| 116 | srcs: [ |
| 117 | "LimitProcessMemory.cpp", |
| 118 | "MemoryLeakTrackUtil.cpp", |
| 119 | ], |
| 120 | static_libs: [ |
| 121 | "libc_malloc_debug_backtrace", |
| 122 | ], |
| 123 | include_dirs: [ |
| 124 | // For DEBUGGER_SIGNAL |
| 125 | "system/core/debuggerd/include", |
| 126 | ], |
| 127 | header_libs: [ |
| 128 | "bionic_libc_platform_headers", |
| 129 | ], |
| 130 | }, |
| 131 | }, |
| 132 | |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 133 | local_include_dirs: ["include"], |
| 134 | export_include_dirs: ["include"], |
| 135 | } |
Andy Hung | 328d677 | 2021-01-12 12:32:21 -0800 | [diff] [blame] | 136 | |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 137 | cc_library { |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 138 | name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame^] | 139 | host_supported: true, |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 140 | defaults: ["libmediautils_defaults"], |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 141 | srcs: [ |
| 142 | "MediaUtilsDelayedLibrary.cpp", |
| 143 | ], |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 144 | shared_libs: [ |
| 145 | "liblog", |
| 146 | "libutils", |
| 147 | "libutilscallstack", |
| 148 | ], |
| 149 | } |
| 150 | |
| 151 | cc_library { |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 152 | name: "libmediautils_vendor", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 153 | defaults: ["libmediautils_defaults"], |
| 154 | vendor_available: true, // required for platform/hardware/interfaces |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 155 | srcs: [ |
| 156 | "MemoryLeakTrackUtil.cpp", |
| 157 | ], |
| 158 | |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 159 | shared_libs: [ |
| 160 | "liblog", |
| 161 | "libutils", |
| 162 | ], |
| 163 | |
| 164 | static_libs: [ |
| 165 | "libc_malloc_debug_backtrace", |
| 166 | ], |
| 167 | |
| 168 | header_libs: [ |
| 169 | "bionic_libc_platform_headers", |
| 170 | ], |
| 171 | |
| 172 | local_include_dirs: ["include"], |
| 173 | export_include_dirs: ["include"], |
| 174 | } |