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 15package { 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 24cc_defaults { 25 name: "libmediautils_defaults", 26 cflags: [ 27 "-Wall", 28 "-Werror", 29 "-Wextra", 30 ], 31 sanitize: { 32 cfi: true, 33 integer_overflow: true, 34 }, 35 target: { 36 host: { 37 sanitize: { 38 cfi: false, 39 }, 40 }, 41 }, 42} 43 44filegroup { 45 name: "libmediautils_core_srcs", 46 srcs: [ 47 "AImageReaderUtils.cpp", 48 "BatteryNotifier.cpp", 49 "ISchedulingPolicyService.cpp", 50 "Library.cpp", 51 "MediaUtilsDelayed.cpp", 52 "MethodStatistics.cpp", 53 "Process.cpp", 54 "ProcessInfo.cpp", 55 "SchedulingPolicyService.cpp", 56 "ServiceUtilities.cpp", 57 "ThreadSnapshot.cpp", 58 "TimeCheck.cpp", 59 "TimerThread.cpp", 60 ], 61} 62 63cc_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 74 75cc_library { 76 name: "libmediautils", 77 host_supported: true, 78 defaults: ["libmediautils_defaults"], 79 srcs: [ 80 ":libmediautils_core_srcs", 81 ], 82 static_libs: [ 83 "libbatterystats_aidl", 84 "libprocessinfoservice_aidl", 85 ], 86 shared_libs: [ 87 "libaudioclient_aidl_conversion", 88 "libaudioutils", // for clock.h, Statistics.h 89 "libbase", 90 "libbinder", 91 "libcutils", 92 "libhidlbase", 93 "liblog", 94 "libpermission", 95 "libutils", 96 "android.hardware.graphics.bufferqueue@1.0", 97 "android.hidl.token@1.0-utils", 98 "packagemanager_aidl-cpp", 99 ], 100 export_static_lib_headers: [ 101 "libbatterystats_aidl", 102 ], 103 104 logtags: ["EventLogTags.logtags"], 105 106 cflags: [ 107 "-Wall", 108 "-Wextra", 109 "-Werror", 110 "-Wthread-safety", 111 ], 112 113 export_shared_lib_headers: [ 114 "libpermission", 115 ], 116 117 required: [ 118 "libmediautils_delayed", // lazy loaded 119 ], 120 121 target: { 122 android: { 123 srcs: [ 124 "LimitProcessMemory.cpp", 125 "MemoryLeakTrackUtil.cpp", 126 ], 127 static_libs: [ 128 "libc_malloc_debug_backtrace", 129 ], 130 include_dirs: [ 131 // For DEBUGGER_SIGNAL 132 "system/core/debuggerd/include", 133 ], 134 header_libs: [ 135 "bionic_libc_platform_headers", 136 ], 137 }, 138 }, 139 140 local_include_dirs: ["include"], 141 export_include_dirs: ["include"], 142} 143 144cc_library { 145 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME 146 host_supported: true, 147 defaults: ["libmediautils_defaults"], 148 srcs: [ 149 "MediaUtilsDelayedLibrary.cpp", 150 ], 151 shared_libs: [ 152 "liblog", 153 "libutils", 154 "libutilscallstack", 155 ], 156} 157 158cc_library { 159 name: "libmediautils_vendor", 160 defaults: ["libmediautils_defaults"], 161 vendor_available: true, // required for platform/hardware/interfaces 162 srcs: [ 163 "MemoryLeakTrackUtil.cpp", 164 ], 165 166 shared_libs: [ 167 "liblog", 168 "libutils", 169 ], 170 171 static_libs: [ 172 "libc_malloc_debug_backtrace", 173 ], 174 175 header_libs: [ 176 "bionic_libc_platform_headers", 177 ], 178 179 local_include_dirs: ["include"], 180 export_include_dirs: ["include"], 181} 182