| /* |
| * Copyright (C) 2018 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| // TODO(b/31559095): bionic on host should define this |
| package { |
| default_applicable_licenses: ["frameworks_native_libs_binder_ndk_license"], |
| } |
| |
| // Added automatically by a large-scale-change |
| // See: http://go/android-license-faq |
| license { |
| name: "frameworks_native_libs_binder_ndk_license", |
| visibility: [":__subpackages__"], |
| license_kinds: [ |
| "SPDX-license-identifier-Apache-2.0", |
| ], |
| license_text: [ |
| "NOTICE", |
| ], |
| } |
| |
| cc_library { |
| name: "libbinder_ndk", |
| |
| host_supported: true, |
| recovery_available: true, |
| |
| llndk: { |
| symbol_file: "libbinder_ndk.map.txt", |
| }, |
| |
| export_include_dirs: [ |
| "include_cpp", |
| "include_ndk", |
| "include_platform", |
| ], |
| |
| cflags: [ |
| "-Wall", |
| "-Wextra", |
| "-Werror", |
| ], |
| |
| srcs: [ |
| "ibinder.cpp", |
| "ibinder_jni.cpp", |
| "libbinder.cpp", |
| "parcel.cpp", |
| "parcel_jni.cpp", |
| "persistable_bundle.cpp", |
| "process.cpp", |
| "stability.cpp", |
| "status.cpp", |
| "service_manager.cpp", |
| ], |
| |
| static_libs: [ |
| "libandroid_runtime_lazy", |
| "libbase", |
| ], |
| |
| shared_libs: [ |
| "libbinder", |
| "liblog", |
| "libutils", |
| ], |
| |
| header_libs: [ |
| "jni_headers", |
| ], |
| export_header_lib_headers: [ |
| "jni_headers", |
| ], |
| |
| target: { |
| android: { |
| // Only one copy of this library on an Android device |
| static: { |
| enabled: false, |
| }, |
| }, |
| linux: { |
| version_script: "libbinder_ndk.map.txt", |
| }, |
| darwin: { |
| enabled: false, |
| }, |
| }, |
| stubs: { |
| symbol_file: "libbinder_ndk.map.txt", |
| versions: [ |
| "29", |
| "30", |
| ], |
| }, |
| sanitize: { |
| misc_undefined: ["integer"], |
| }, |
| tidy: true, |
| tidy_flags: [ |
| // Only check our headers |
| "--header-filter=^.*frameworks/native/libs/binder/.*.h$", |
| ], |
| tidy_checks_as_errors: [ |
| // Explicitly list the checks that should not occur in this module. |
| "abseil-*", |
| "android-*", |
| "bugprone-*", |
| "-bugprone-branch-clone", // b/155034972 |
| "cert-*", |
| "clang-analyzer-*", |
| "-clang-analyzer-core.CallAndMessage", |
| "-clang-analyzer-core.uninitialized.Assign", |
| "-clang-analyzer-unix.Malloc", |
| "-clang-analyzer-deadcode.DeadStores", |
| "-clang-analyzer-optin.cplusplus.UninitializedObject", |
| "google-*", |
| "-google-readability-*", |
| "-google-runtime-references", |
| "misc-*", |
| "-misc-no-recursion", |
| "-misc-non-private-member-variables-in-classes", |
| "-misc-redundant-expression", |
| "-misc-unused-parameters", |
| "-misc-unused-using-decls", |
| "performance*", |
| "portability*", |
| ], |
| afdo: true, |
| } |
| |
| cc_library_headers { |
| name: "libbinder_headers_platform_shared", |
| export_include_dirs: ["include_cpp"], |
| vendor_available: true, |
| recovery_available: true, |
| host_supported: true, |
| // TODO(b/153609531): remove when no longer needed. |
| native_bridge_supported: true, |
| target: { |
| darwin: { |
| enabled: false, |
| }, |
| }, |
| apex_available: [ |
| "//apex_available:platform", |
| "com.android.media", |
| "com.android.media.swcodec", |
| ], |
| min_sdk_version: "29", |
| } |
| |
| ndk_headers { |
| name: "libbinder_ndk_headers", |
| from: "include_ndk/android", |
| to: "android", |
| srcs: [ |
| "include_ndk/android/*.h", |
| ], |
| license: "NOTICE", |
| } |
| |
| // TODO(b/160624671): package with the aidl compiler |
| ndk_headers { |
| name: "libbinder_ndk_helper_headers", |
| from: "include_cpp/android", |
| to: "android", |
| srcs: [ |
| "include_cpp/android/*.h", |
| ], |
| license: "NOTICE", |
| } |
| |
| ndk_library { |
| name: "libbinder_ndk", |
| symbol_file: "libbinder_ndk.map.txt", |
| first_version: "29", |
| export_header_libs: [ |
| "libbinder_ndk_headers", |
| "libbinder_ndk_helper_headers", |
| ], |
| } |