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: [ |
Atneya Nair | c1b01f7 | 2023-10-30 16:28:09 -0700 | [diff] [blame] | 87 | "com.android.media.audio-aconfig-cc", |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 88 | "libaudioclient_aidl_conversion", |
Andy Hung | c747c53 | 2022-03-07 21:41:14 -0800 | [diff] [blame] | 89 | "libaudioutils", // for clock.h, Statistics.h |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 90 | "libbase", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 91 | "libbinder", |
Jeffrey Carlyle | 62cc92b | 2019-09-17 11:15:15 -0700 | [diff] [blame] | 92 | "libcutils", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 93 | "libhidlbase", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 94 | "liblog", |
Svet Ganov | 3376113 | 2021-05-13 22:51:08 +0000 | [diff] [blame] | 95 | "libpermission", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 96 | "libutils", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 97 | "android.hardware.graphics.bufferqueue@1.0", |
| 98 | "android.hidl.token@1.0-utils", |
Samiul Islam | acb722d | 2021-08-26 11:41:21 +0100 | [diff] [blame] | 99 | "packagemanager_aidl-cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 100 | ], |
Steven Moreland | 3696000 | 2021-04-01 00:08:45 +0000 | [diff] [blame] | 101 | export_static_lib_headers: [ |
| 102 | "libbatterystats_aidl", |
| 103 | ], |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 104 | |
Eric Laurent | 39b09b5 | 2018-06-29 12:24:40 -0700 | [diff] [blame] | 105 | logtags: ["EventLogTags.logtags"], |
| 106 | |
Shunkai Yao | 7bf9e7c | 2023-02-08 18:55:17 +0000 | [diff] [blame] | 107 | cflags: [ |
| 108 | "-Wall", |
| 109 | "-Wextra", |
| 110 | "-Werror", |
| 111 | "-Wthread-safety", |
| 112 | ], |
| 113 | |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 114 | export_shared_lib_headers: [ |
Svet Ganov | 3376113 | 2021-05-13 22:51:08 +0000 | [diff] [blame] | 115 | "libpermission", |
Abhishek Gadewar | 52ff0f8 | 2024-05-28 15:00:19 -0700 | [diff] [blame^] | 116 | "packagemanager_aidl-cpp", |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 117 | ], |
| 118 | |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 119 | required: [ |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 120 | "libmediautils_delayed", // lazy loaded |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 121 | ], |
| 122 | |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame] | 123 | target: { |
| 124 | android: { |
| 125 | srcs: [ |
| 126 | "LimitProcessMemory.cpp", |
| 127 | "MemoryLeakTrackUtil.cpp", |
| 128 | ], |
| 129 | static_libs: [ |
| 130 | "libc_malloc_debug_backtrace", |
| 131 | ], |
| 132 | include_dirs: [ |
| 133 | // For DEBUGGER_SIGNAL |
| 134 | "system/core/debuggerd/include", |
| 135 | ], |
| 136 | header_libs: [ |
| 137 | "bionic_libc_platform_headers", |
| 138 | ], |
| 139 | }, |
| 140 | }, |
| 141 | |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 142 | local_include_dirs: ["include"], |
| 143 | export_include_dirs: ["include"], |
| 144 | } |
Andy Hung | 328d677 | 2021-01-12 12:32:21 -0800 | [diff] [blame] | 145 | |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 146 | cc_library { |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 147 | name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME |
Atneya Nair | f5b6851 | 2022-05-23 20:02:49 -0400 | [diff] [blame] | 148 | host_supported: true, |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 149 | defaults: ["libmediautils_defaults"], |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 150 | srcs: [ |
| 151 | "MediaUtilsDelayedLibrary.cpp", |
| 152 | ], |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 153 | shared_libs: [ |
| 154 | "liblog", |
| 155 | "libutils", |
| 156 | "libutilscallstack", |
| 157 | ], |
| 158 | } |
| 159 | |
| 160 | cc_library { |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 161 | name: "libmediautils_vendor", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame] | 162 | defaults: ["libmediautils_defaults"], |
| 163 | vendor_available: true, // required for platform/hardware/interfaces |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 164 | srcs: [ |
| 165 | "MemoryLeakTrackUtil.cpp", |
| 166 | ], |
| 167 | |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 168 | shared_libs: [ |
| 169 | "liblog", |
| 170 | "libutils", |
| 171 | ], |
| 172 | |
| 173 | static_libs: [ |
| 174 | "libc_malloc_debug_backtrace", |
| 175 | ], |
| 176 | |
| 177 | header_libs: [ |
| 178 | "bionic_libc_platform_headers", |
| 179 | ], |
| 180 | |
| 181 | local_include_dirs: ["include"], |
| 182 | export_include_dirs: ["include"], |
| 183 | } |
Akshata Kadam | 596e17e | 2023-01-02 18:09:54 +0530 | [diff] [blame] | 184 | |
| 185 | cc_library_headers { |
| 186 | name: "mediautils_headers", |
| 187 | export_include_dirs: ["include", "."], |
| 188 | } |