blob: 1ca91b39a8292b40fde01088e05d40741db16029 [file] [log] [blame]
// Copyright (C) 2009 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.
package {
default_applicable_licenses: ["system_libhwbinder_license"],
}
// Added automatically by a large-scale-change
// http://go/android-license-faq
license {
name: "system_libhwbinder_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
cc_library_headers {
name: "libhwbinder_headers",
export_include_dirs: ["include"],
host_supported: true,
recovery_available: true,
vendor_available: true,
product_available: true,
// TODO(b/153609531): remove when no longer needed.
native_bridge_supported: true,
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
min_sdk_version: "29",
}
cc_defaults {
name: "libhwbinder_defaults",
header_libs: ["libhwbinder_headers"],
export_header_lib_headers: ["libhwbinder_headers"],
sanitize: {
misc_undefined: ["integer"],
},
srcs: [
"Binder.cpp",
"BpHwBinder.cpp",
"BufferedTextOutput.cpp",
"Debug.cpp",
"IInterface.cpp",
"IPCThreadState.cpp",
"Parcel.cpp",
"ProcessState.cpp",
"Static.cpp",
"TextOutput.cpp",
"Utils.cpp",
],
product_variables: {
binder32bit: {
cflags: ["-DBINDER_IPC_32BIT=1"],
},
},
cflags: [
"-Wall",
"-Werror",
],
}
cc_defaults {
name: "libhwbinder-impl-shared-libs",
shared_libs: [
"libbase",
"liblog",
"libcutils",
"libutils",
],
export_shared_lib_headers: [
"libbase",
"libutils",
],
}
// WARNING: this should no longer be used
// This is automatically removed by bpfix. Once there are no makefiles, fixes can be automatically applied, and this can be removed.
cc_library {
name: "libhwbinder",
vendor_available: true,
export_include_dirs: ["include"],
visibility: [
":__subpackages__",
"//vendor:__subpackages__",
],
}
// Combined into libhidlbase for efficiency.
// Used as shared library to provide headers for libhidltransport-impl-internal.
cc_library_static {
name: "libhwbinder-impl-internal",
include_dirs: [
// TODO(b/31559095): get headers from bionic on host
"bionic/libc/kernel/android/uapi/",
"bionic/libc/kernel/uapi/",
],
defaults: [
"libhwbinder_defaults",
"libhwbinder-impl-shared-libs",
"hwbinder_lto",
],
host_supported: true,
recovery_available: true,
vendor_available: true,
product_available: true,
// TODO(b/153609531): remove when no longer needed.
native_bridge_supported: true,
apex_available: [
"//apex_available:platform",
"com.android.neuralnetworks",
"com.android.bluetooth",
"com.android.media",
"com.android.media.swcodec",
"com.android.tethering",
],
min_sdk_version: "29",
}
// Provide lto property to build hwbinder with LTO
cc_defaults {
name: "hwbinder_lto",
target: {
android: {
lto: {
thin: true,
},
},
},
}