blob: 86f19c5873e2c13fc1e01b09e90995bfaddd7de3 [file] [log] [blame]
Dan Willemsene05dc6d2016-07-25 17:13:45 -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
Vijay Venkatraman5583be72017-03-24 16:13:58 -070015cc_library_headers {
16 name: "libbinder_headers",
17 export_include_dirs: ["include"],
Jiyong Park172bd722017-06-21 12:14:18 +090018 vendor_available: true,
Jiyong Parkb7df6cb2017-04-13 21:19:48 -070019 header_libs: [
20 "libbase_headers",
21 "libcutils_headers",
22 "libutils_headers",
23 ],
24 export_header_lib_headers: [
25 "libbase_headers",
26 "libcutils_headers",
27 "libutils_headers",
28 ],
Vijay Venkatraman5583be72017-03-24 16:13:58 -070029}
30
Steven Moreland7d48c5b2018-07-16 11:06:27 -070031cc_library_shared {
Dan Willemsene05dc6d2016-07-25 17:13:45 -070032 name: "libbinder",
33
Steven Moreland3aa76162017-04-13 21:19:48 -070034 // for vndbinder
35 vendor_available: true,
Justin Yunb367ff42017-08-02 17:02:05 +090036 vndk: {
37 enabled: true,
38 },
Jiyong Parkfe0a8242018-04-09 12:16:30 +090039 double_loadable: true,
Steven Moreland636d7d52019-08-26 10:42:38 -070040
41 // libbinder does not offer a stable wire protocol.
42 // if a second copy of it is installed, then it may break after security
43 // or dessert updates. Instead, apex users should use libbinder_ndk.
Jiyong Park79984982019-08-12 10:37:39 +090044 no_apex: true,
Steven Moreland3aa76162017-04-13 21:19:48 -070045
Dan Willemsene05dc6d2016-07-25 17:13:45 -070046 srcs: [
Ganesh Mahendran4d85b8c2017-11-02 14:43:38 +000047 "ActivityManager.cpp",
Dan Willemsene05dc6d2016-07-25 17:13:45 -070048 "AppOpsManager.cpp",
49 "Binder.cpp",
50 "BpBinder.cpp",
51 "BufferedTextOutput.cpp",
52 "Debug.cpp",
Sudheer Shanka6ef26f12016-11-23 15:52:26 -080053 "IActivityManager.cpp",
Dan Willemsene05dc6d2016-07-25 17:13:45 -070054 "IAppOpsCallback.cpp",
55 "IAppOpsService.cpp",
56 "IBatteryStats.cpp",
57 "IInterface.cpp",
58 "IMediaResourceMonitor.cpp",
59 "IMemory.cpp",
60 "IPCThreadState.cpp",
61 "IPermissionController.cpp",
62 "IProcessInfoService.cpp",
63 "IResultReceiver.cpp",
64 "IServiceManager.cpp",
Dianne Hackborn1941a402016-08-29 12:30:43 -070065 "IShellCallback.cpp",
Ganesh Mahendran4d85b8c2017-11-02 14:43:38 +000066 "IUidObserver.cpp",
Dan Willemsene05dc6d2016-07-25 17:13:45 -070067 "MemoryBase.cpp",
68 "MemoryDealer.cpp",
69 "MemoryHeapBase.cpp",
70 "Parcel.cpp",
Ryo Hashimotobf551892018-05-31 16:58:35 +090071 "ParcelFileDescriptor.cpp",
Dan Willemsene05dc6d2016-07-25 17:13:45 -070072 "PermissionCache.cpp",
Svet Ganove752a5c2018-01-15 17:14:20 -080073 "PermissionController.cpp",
Dan Willemsene05dc6d2016-07-25 17:13:45 -070074 "PersistableBundle.cpp",
75 "ProcessInfoService.cpp",
76 "ProcessState.cpp",
77 "Static.cpp",
Steven Morelanda86a3562019-08-01 23:28:34 +000078 "Stability.cpp",
Dan Willemsene05dc6d2016-07-25 17:13:45 -070079 "Status.cpp",
80 "TextOutput.cpp",
Robert Quattlebaum6316f5b2017-01-04 13:25:14 -080081 "IpPrefix.cpp",
Colin Cross21c210e2017-11-14 13:05:37 -080082 ":libbinder_aidl",
Dan Willemsene05dc6d2016-07-25 17:13:45 -070083 ],
84
Jiyong Park47f876b2018-04-17 13:56:46 +090085 target: {
86 vendor: {
87 exclude_srcs: [
88 "ActivityManager.cpp",
89 "AppOpsManager.cpp",
90 "IActivityManager.cpp",
91 "IAppOpsCallback.cpp",
92 "IAppOpsService.cpp",
93 "IBatteryStats.cpp",
94 "IMediaResourceMonitor.cpp",
95 "IPermissionController.cpp",
96 "IProcessInfoService.cpp",
97 "IUidObserver.cpp",
98 "PermissionCache.cpp",
99 "PermissionController.cpp",
100 "ProcessInfoService.cpp",
101 "IpPrefix.cpp",
Jiyong Park47f876b2018-04-17 13:56:46 +0900102 ],
103 },
104 },
105
Todd Kennedy757186e2017-08-02 07:49:20 -0700106 aidl: {
107 export_aidl_headers: true,
108 },
109
Dan Willemsene05dc6d2016-07-25 17:13:45 -0700110 cflags: [
111 "-Wall",
112 "-Wextra",
113 "-Werror",
Yi Kongc2376e42018-07-10 15:12:36 -0700114 "-Wzero-as-null-pointer-constant",
Dan Willemsene05dc6d2016-07-25 17:13:45 -0700115 ],
116 product_variables: {
117 binder32bit: {
118 cflags: ["-DBINDER_IPC_32BIT=1"],
119 },
120 },
121
122 shared_libs: [
Dan Willemsene05dc6d2016-07-25 17:13:45 -0700123 "liblog",
124 "libcutils",
125 "libutils",
Jayant Chowdharydac6dc82018-10-01 22:52:44 +0000126 "libbinderthreadstate",
Dan Willemsene05dc6d2016-07-25 17:13:45 -0700127 ],
Jiyong Park42842052017-06-20 13:51:22 +0900128
129 header_libs: [
130 "libbinder_headers",
131 ],
132
Jiyong Park42842052017-06-20 13:51:22 +0900133 export_header_lib_headers: [
134 "libbinder_headers",
Dan Stozad630e522016-12-01 15:16:31 -0800135 ],
136
Dan Willemsene05dc6d2016-07-25 17:13:45 -0700137 clang: true,
138 sanitize: {
139 misc_undefined: ["integer"],
140 },
141}
142
Colin Cross21c210e2017-11-14 13:05:37 -0800143// AIDL interface between libbinder and framework.jar
144filegroup {
145 name: "libbinder_aidl",
146 srcs: [
147 "aidl/android/content/pm/IPackageManagerNative.aidl",
Steven Moreland27cfab02019-08-12 14:34:16 -0700148 "aidl/android/os/IServiceCallback.aidl",
Steven Moreland80e1e6d2019-06-21 12:35:59 -0700149 "aidl/android/os/IServiceManager.aidl",
Colin Cross21c210e2017-11-14 13:05:37 -0800150 ],
Dan Willemsena5d65222018-09-14 21:27:01 -0700151 path: "aidl",
Colin Cross21c210e2017-11-14 13:05:37 -0800152}