1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "frameworks_av_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["frameworks_av_license"], 24} 25 26cc_library_static { 27 name: "libmediabenchmark_common", 28 defaults: [ 29 "libmediabenchmark-defaults", 30 "libmediabenchmark_soft_sanitize_all-defaults", 31 ], 32 33 srcs: [ 34 "BenchmarkCommon.cpp", 35 "Stats.cpp", 36 "utils/Timers.cpp", 37 ], 38 39 export_include_dirs: ["."], 40 41 ldflags: ["-Wl,-Bsymbolic"], 42} 43 44cc_defaults { 45 name: "libmediabenchmark_common-defaults", 46 47 defaults: [ 48 "libmediabenchmark-defaults", 49 ], 50 51 static_libs: [ 52 "libmediabenchmark_common", 53 ], 54} 55 56cc_defaults { 57 name: "libmediabenchmark-defaults", 58 stl: "c++_shared", 59 60 shared_libs: [ 61 "libmediandk", 62 "liblog", 63 ], 64 65 cflags: [ 66 "-Wall", 67 "-Werror", 68 ], 69} 70 71cc_library_static { 72 name: "libmediabenchmark_codec2_common", 73 defaults: [ 74 "libmediabenchmark_codec2_common-defaults", 75 ], 76 77 srcs: [ 78 "BenchmarkC2Common.cpp", 79 "BenchmarkCommon.cpp", 80 "Stats.cpp", 81 "utils/Timers.cpp", 82 ], 83 84 export_include_dirs: ["."], 85 86 ldflags: ["-Wl,-Bsymbolic"], 87} 88 89cc_defaults { 90 name: "libmediabenchmark_codec2_common-defaults", 91 92 defaults: [ 93 "libcodec2-hidl-client-defaults", 94 "libmediabenchmark_soft_sanitize_all-defaults", 95 ], 96 97 shared_libs: [ 98 "libcodec2_client", 99 "libmediandk", 100 "liblog", 101 ], 102 103 cflags: [ 104 "-Wall", 105 "-Werror", 106 ], 107} 108 109// public dependency for native implementation 110// to be used by code under media/benchmark/* only 111cc_defaults { 112 name: "libmediabenchmark_soft_sanitize_all-defaults", 113 114 sanitize: { 115 misc_undefined: [ 116 "unsigned-integer-overflow", 117 "signed-integer-overflow", 118 ], 119 cfi: true, 120 }, 121} 122