Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 1 | // Copyright (C) 2019 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 | |
jiabin | 613e6ae | 2022-12-21 20:20:11 +0000 | [diff] [blame] | 24 | tidy_errors = [ |
| 25 | // https://clang.llvm.org/extra/clang-tidy/checks/list.html |
| 26 | // For many categories, the checks are too many to specify individually. |
| 27 | // Feel free to disable as needed - as warnings are generally ignored, |
| 28 | // we treat warnings as errors. |
| 29 | "android-*", |
| 30 | "bugprone-*", |
| 31 | "cert-*", |
| 32 | "clang-analyzer-security*", |
| 33 | "google-*", |
| 34 | "misc-*", |
| 35 | //"modernize-*", // explicitly list the modernize as they can be subjective. |
| 36 | "modernize-avoid-bind", |
| 37 | //"modernize-avoid-c-arrays", // std::array<> can be verbose |
| 38 | "modernize-concat-nested-namespaces", |
| 39 | //"modernize-deprecated-headers", // C headers still ok even if there is C++ equivalent. |
| 40 | "modernize-deprecated-ios-base-aliases", |
| 41 | "modernize-loop-convert", |
| 42 | "modernize-make-shared", |
| 43 | "modernize-make-unique", |
| 44 | "modernize-pass-by-value", |
| 45 | "modernize-raw-string-literal", |
| 46 | "modernize-redundant-void-arg", |
| 47 | "modernize-replace-auto-ptr", |
| 48 | "modernize-replace-random-shuffle", |
| 49 | "modernize-return-braced-init-list", |
| 50 | "modernize-shrink-to-fit", |
| 51 | "modernize-unary-static-assert", |
| 52 | "modernize-use-auto", |
| 53 | "modernize-use-bool-literals", |
| 54 | "modernize-use-default-member-init", |
| 55 | "modernize-use-emplace", |
| 56 | "modernize-use-equals-default", |
| 57 | "modernize-use-equals-delete", |
jiabin | 8ecf633 | 2023-12-05 18:51:29 +0000 | [diff] [blame] | 58 | "modernize-use-nodiscard", |
jiabin | 613e6ae | 2022-12-21 20:20:11 +0000 | [diff] [blame] | 59 | "modernize-use-noexcept", |
| 60 | "modernize-use-nullptr", |
| 61 | "modernize-use-override", |
| 62 | // "modernize-use-trailing-return-type", // not necessarily more readable |
| 63 | "modernize-use-transparent-functors", |
| 64 | "modernize-use-uncaught-exceptions", |
| 65 | "modernize-use-using", |
| 66 | "performance-*", |
| 67 | |
| 68 | // Remove some pedantic stylistic requirements. |
| 69 | "-android-cloexec-dup", // found in AAudioServiceEndpointMMAP.cpp |
| 70 | "-bugprone-narrowing-conversions", // found in several interface from size_t to int32_t |
| 71 | |
jiabin | 613e6ae | 2022-12-21 20:20:11 +0000 | [diff] [blame] | 72 | "-google-build-using-namespace", // Reenable and fix later. |
| 73 | "-google-global-names-in-headers", // found in several files |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 74 | "-google-readability-casting", // C++ casts not always necessary and may be verbose |
| 75 | "-google-readability-todo", // do not require TODO(info) |
jiabin | 613e6ae | 2022-12-21 20:20:11 +0000 | [diff] [blame] | 76 | |
| 77 | "-misc-non-private-member-variables-in-classes", // found in aidl generated files |
| 78 | |
| 79 | ] |
| 80 | |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 81 | cc_defaults { |
| 82 | name: "libaaudioservice_dependencies", |
jiabin | 613e6ae | 2022-12-21 20:20:11 +0000 | [diff] [blame] | 83 | |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 84 | shared_libs: [ |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 85 | "aaudio-aidl-cpp", |
| 86 | "com.android.media.aaudio-aconfig-cc", |
Kiyoung Kim | ac6572a | 2024-08-12 13:52:07 +0900 | [diff] [blame] | 87 | "com.android.media.aaudio-aconfig-cc", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 88 | "framework-permission-aidl-cpp", |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 89 | "libaaudio_internal", |
| 90 | "libaudioclient", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 91 | "libaudioclient_aidl_conversion", |
Robert Wu | aeb1d00 | 2024-10-30 23:19:44 +0000 | [diff] [blame] | 92 | "libaudiofoundation", |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 93 | "libaudioutils", |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 94 | "libbase", |
| 95 | "libbinder", |
| 96 | "libcutils", |
| 97 | "liblog", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 98 | "libmedia_helper", |
| 99 | "libmediametrics", |
| 100 | "libmediautils", |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 101 | "libutils", |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 102 | "packagemanager_aidl-cpp", |
| 103 | ], |
| 104 | |
| 105 | static_libs: [ |
| 106 | "libaudioflinger", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 107 | ], |
Devin Moore | 55a2fc9 | 2023-05-11 23:48:00 +0000 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | cc_library_static { |
Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 111 | |
| 112 | name: "libaaudioservice", |
| 113 | |
Lorena Torres-Huerta | 03112f6 | 2022-08-12 23:08:12 +0000 | [diff] [blame] | 114 | defaults: [ |
| 115 | "latest_android_media_audio_common_types_cpp_shared", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 116 | "libaaudioservice_dependencies", |
Lorena Torres-Huerta | 03112f6 | 2022-08-12 23:08:12 +0000 | [diff] [blame] | 117 | ], |
| 118 | |
Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 119 | srcs: [ |
| 120 | "AAudioClientTracker.cpp", |
jiabin | 2a59462 | 2021-10-14 00:32:25 +0000 | [diff] [blame] | 121 | "AAudioCommandQueue.cpp", |
Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 122 | "AAudioEndpointManager.cpp", |
| 123 | "AAudioMixer.cpp", |
| 124 | "AAudioService.cpp", |
| 125 | "AAudioServiceEndpoint.cpp", |
| 126 | "AAudioServiceEndpointCapture.cpp", |
| 127 | "AAudioServiceEndpointMMAP.cpp", |
| 128 | "AAudioServiceEndpointPlay.cpp", |
| 129 | "AAudioServiceEndpointShared.cpp", |
| 130 | "AAudioServiceStreamBase.cpp", |
| 131 | "AAudioServiceStreamMMAP.cpp", |
| 132 | "AAudioServiceStreamShared.cpp", |
| 133 | "AAudioStreamTracker.cpp", |
| 134 | "AAudioThread.cpp", |
| 135 | "SharedMemoryProxy.cpp", |
jiabin | fc791ee | 2023-02-15 19:43:40 +0000 | [diff] [blame] | 136 | "SharedMemoryWrapper.cpp", |
Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 137 | "SharedRingBuffer.cpp", |
| 138 | "TimestampScheduler.cpp", |
| 139 | ], |
| 140 | |
| 141 | cflags: [ |
Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 142 | "-Wall", |
| 143 | "-Werror", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 144 | "-Wno-unused-parameter", |
| 145 | "-Wthread-safety", |
Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 146 | ], |
| 147 | |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 148 | export_shared_lib_headers: [ |
Svet Ganov | 3376113 | 2021-05-13 22:51:08 +0000 | [diff] [blame] | 149 | "framework-permission-aidl-cpp", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 150 | "libaaudio_internal", |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 151 | ], |
| 152 | |
Marco Nelissen | a51151a | 2020-01-07 13:37:47 -0800 | [diff] [blame] | 153 | header_libs: [ |
| 154 | "libaudiohal_headers", |
| 155 | ], |
| 156 | |
| 157 | include_dirs: [ |
Marco Nelissen | a51151a | 2020-01-07 13:37:47 -0800 | [diff] [blame] | 158 | "frameworks/av/media/libnbaio/include", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 159 | "frameworks/av/media/libnbaio/include_mono", |
Marco Nelissen | a51151a | 2020-01-07 13:37:47 -0800 | [diff] [blame] | 160 | ], |
jiabin | 613e6ae | 2022-12-21 20:20:11 +0000 | [diff] [blame] | 161 | |
Andy Hung | 4b64ee5 | 2024-07-31 17:07:24 -0700 | [diff] [blame] | 162 | export_include_dirs: ["."], |
| 163 | |
jiabin | 613e6ae | 2022-12-21 20:20:11 +0000 | [diff] [blame] | 164 | tidy: true, |
| 165 | tidy_checks: tidy_errors, |
| 166 | tidy_checks_as_errors: tidy_errors, |
| 167 | tidy_flags: [ |
| 168 | "-format-style=file", |
Andy Hung | a159e4b | 2024-03-15 11:48:57 -0700 | [diff] [blame] | 169 | ], |
Mikhail Naganov | 1209b48 | 2019-04-26 16:20:57 -0700 | [diff] [blame] | 170 | } |