blob: 1ca91b39a8292b40fde01088e05d40741db16029 [file] [log] [blame]
Dan Willemsenf7cc91b2016-09-13 16:35:00 -07001// Copyright (C) 2009 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 Badour28383df2021-02-03 23:56:34 -080015package {
16 default_applicable_licenses: ["system_libhwbinder_license"],
17}
18
19// Added automatically by a large-scale-change
20// http://go/android-license-faq
21license {
22 name: "system_libhwbinder_license",
23 visibility: [":__subpackages__"],
24 license_kinds: [
25 "SPDX-license-identifier-Apache-2.0",
26 ],
27 license_text: [
28 "NOTICE",
29 ],
30}
31
Steven Moreland76ad7c52020-07-29 23:00:51 +000032cc_library_headers {
33 name: "libhwbinder_headers",
34 export_include_dirs: ["include"],
35 host_supported: true,
36 recovery_available: true,
37 vendor_available: true,
Justin Yun2f571402020-11-11 19:24:19 +090038 product_available: true,
Steven Moreland76ad7c52020-07-29 23:00:51 +000039 // TODO(b/153609531): remove when no longer needed.
40 native_bridge_supported: true,
41 apex_available: [
42 "//apex_available:platform",
43 "//apex_available:anyapex",
44 ],
45 min_sdk_version: "29",
46}
47
Yi Kong1a8beb62018-04-03 12:15:58 -070048cc_defaults {
49 name: "libhwbinder_defaults",
Steven Moreland09a87252019-06-17 17:18:02 -070050
Steven Moreland76ad7c52020-07-29 23:00:51 +000051 header_libs: ["libhwbinder_headers"],
52 export_header_lib_headers: ["libhwbinder_headers"],
Dan Willemsenf7cc91b2016-09-13 16:35:00 -070053
Dan Willemsenf7cc91b2016-09-13 16:35:00 -070054 sanitize: {
55 misc_undefined: ["integer"],
56 },
57 srcs: [
58 "Binder.cpp",
Yifan Hong1e118d22017-01-12 14:42:28 -080059 "BpHwBinder.cpp",
Dan Willemsenf7cc91b2016-09-13 16:35:00 -070060 "BufferedTextOutput.cpp",
61 "Debug.cpp",
62 "IInterface.cpp",
63 "IPCThreadState.cpp",
64 "Parcel.cpp",
65 "ProcessState.cpp",
66 "Static.cpp",
67 "TextOutput.cpp",
Steven Morelanda80270c2020-11-19 21:08:28 +000068 "Utils.cpp",
Dan Willemsenf7cc91b2016-09-13 16:35:00 -070069 ],
70
71 product_variables: {
72 binder32bit: {
73 cflags: ["-DBINDER_IPC_32BIT=1"],
74 },
75 },
76
Chih-Hung Hsieh29dbdcf2017-10-02 10:42:37 -070077 cflags: [
78 "-Wall",
79 "-Werror",
80 ],
81}
Zhizhou Yang5166bc52018-03-26 17:19:04 -070082
Steven Moreland09a87252019-06-17 17:18:02 -070083cc_defaults {
84 name: "libhwbinder-impl-shared-libs",
Steven Moreland09a87252019-06-17 17:18:02 -070085 shared_libs: [
86 "libbase",
87 "liblog",
88 "libcutils",
89 "libutils",
90 ],
91 export_shared_lib_headers: [
92 "libbase",
93 "libutils",
94 ],
95}
96
97// WARNING: this should no longer be used
Steven Moreland202ca452020-07-07 23:34:10 +000098// This is automatically removed by bpfix. Once there are no makefiles, fixes can be automatically applied, and this can be removed.
Yi Kong1a8beb62018-04-03 12:15:58 -070099cc_library {
100 name: "libhwbinder",
Steven Moreland09a87252019-06-17 17:18:02 -0700101 vendor_available: true,
Steven Moreland09a87252019-06-17 17:18:02 -0700102
103 export_include_dirs: ["include"],
Steven Morelande8adbb12019-10-09 16:27:36 -0700104
Dan Willemsen97767bf2020-06-09 15:28:40 -0700105 visibility: [
106 ":__subpackages__",
107 "//vendor:__subpackages__",
108 ],
Steven Moreland09a87252019-06-17 17:18:02 -0700109}
110
111// Combined into libhidlbase for efficiency.
112// Used as shared library to provide headers for libhidltransport-impl-internal.
113cc_library_static {
114 name: "libhwbinder-impl-internal",
Steven Morelandd9bdb652019-09-17 15:42:45 -0700115 include_dirs: [
Steven Morelandd9bdb652019-09-17 15:42:45 -0700116 // TODO(b/31559095): get headers from bionic on host
117 "bionic/libc/kernel/android/uapi/",
118 "bionic/libc/kernel/uapi/",
119 ],
120
Yi Kong1a8beb62018-04-03 12:15:58 -0700121 defaults: [
122 "libhwbinder_defaults",
Steven Morelande3785d02020-01-31 14:58:48 -0800123 "libhwbinder-impl-shared-libs",
Jayant Chowdhary985fc892018-10-01 22:54:05 +0000124 "hwbinder_lto",
Yi Kong1a8beb62018-04-03 12:15:58 -0700125 ],
Steven Morelandd9bdb652019-09-17 15:42:45 -0700126 host_supported: true,
Steven Moreland09a87252019-06-17 17:18:02 -0700127 recovery_available: true,
128 vendor_available: true,
Justin Yun2f571402020-11-11 19:24:19 +0900129 product_available: true,
Victor Khimenko722a6152020-07-03 00:23:21 +0200130 // TODO(b/153609531): remove when no longer needed.
131 native_bridge_supported: true,
Jiyong Park889cf782020-03-07 17:27:13 +0900132 apex_available: [
133 "//apex_available:platform",
134 "com.android.neuralnetworks",
Etienne Ruffieux3f6d6b52021-12-15 15:43:22 +0000135 "com.android.bluetooth",
Jiyong Park889cf782020-03-07 17:27:13 +0900136 "com.android.media",
137 "com.android.media.swcodec",
138 "com.android.tethering",
139 ],
Jooyung Han1e5505d2020-04-16 18:48:34 +0900140 min_sdk_version: "29",
Yi Kong1a8beb62018-04-03 12:15:58 -0700141}
142
Zhizhou Yang5166bc52018-03-26 17:19:04 -0700143// Provide lto property to build hwbinder with LTO
144cc_defaults {
145 name: "hwbinder_lto",
146 target: {
147 android: {
148 lto: {
149 thin: true,
150 },
151 },
152 },
153}