Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 17 | // TODO(b/31559095): bionic on host should define this |
| 18 | cc_defaults { |
| 19 | name: "libbinder_ndk_host_user", |
| 20 | target: { |
| 21 | host: { |
| 22 | cflags: [ |
| 23 | "-D__INTRODUCED_IN(n)=", |
| 24 | "-D__assert(a,b,c)=", |
Elliott Hughes | 906e0bb | 2019-10-30 14:14:45 -0700 | [diff] [blame] | 25 | // We want all the APIs to be available on the host. |
| 26 | "-D__ANDROID_API__=10000", |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 27 | ], |
| 28 | }, |
Yifan Hong | f856a98 | 2020-10-30 14:51:17 -0700 | [diff] [blame^] | 29 | darwin: { |
| 30 | enabled: false, |
| 31 | }, |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 32 | }, |
| 33 | } |
| 34 | |
Steven Moreland | 28f8142 | 2019-10-03 10:40:59 -0700 | [diff] [blame] | 35 | cc_library { |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 36 | name: "libbinder_ndk", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 37 | |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 38 | defaults: ["libbinder_ndk_host_user"], |
| 39 | host_supported: true, |
| 40 | |
Colin Cross | 8af6d1c | 2020-10-19 13:38:00 -0700 | [diff] [blame] | 41 | llndk_stubs: "libbinder_ndk.llndk", |
| 42 | |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 43 | export_include_dirs: [ |
Steven Moreland | 34aac10 | 2020-07-07 23:24:45 +0000 | [diff] [blame] | 44 | "include_cpp", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 45 | "include_ndk", |
Steven Moreland | 6b7ea2a | 2019-08-08 16:19:21 -0700 | [diff] [blame] | 46 | "include_platform", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 47 | ], |
| 48 | |
Steven Moreland | b8cfad5 | 2019-01-09 13:07:00 -0800 | [diff] [blame] | 49 | cflags: [ |
| 50 | "-Wall", |
| 51 | "-Wextra", |
| 52 | "-Werror", |
| 53 | ], |
Steven Moreland | 763dc4c | 2018-12-12 11:30:06 -0800 | [diff] [blame] | 54 | |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 55 | srcs: [ |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 56 | "ibinder.cpp", |
Steven Moreland | 02f7565 | 2018-09-18 14:08:30 -0700 | [diff] [blame] | 57 | "ibinder_jni.cpp", |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 58 | "parcel.cpp", |
Steven Moreland | 7c61558 | 2020-01-06 16:34:39 -0800 | [diff] [blame] | 59 | "parcel_jni.cpp", |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 60 | "process.cpp", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 61 | "stability.cpp", |
Steven Moreland | 5d62e44 | 2018-09-13 15:01:02 -0700 | [diff] [blame] | 62 | "status.cpp", |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 63 | "service_manager.cpp", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 64 | ], |
| 65 | |
| 66 | shared_libs: [ |
Jooyung Han | 1f65e77 | 2019-03-07 16:55:04 +0900 | [diff] [blame] | 67 | "libandroid_runtime_lazy", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 68 | "libbase", |
| 69 | "libbinder", |
| 70 | "libutils", |
| 71 | ], |
dimitry | b2cf95d | 2018-10-31 14:56:29 +0100 | [diff] [blame] | 72 | |
Steven Moreland | f01f744 | 2019-02-11 15:04:13 -0800 | [diff] [blame] | 73 | header_libs: [ |
| 74 | "jni_headers", |
| 75 | ], |
| 76 | export_header_lib_headers: [ |
| 77 | "jni_headers", |
| 78 | ], |
| 79 | |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 80 | target: { |
Steven Moreland | 28f8142 | 2019-10-03 10:40:59 -0700 | [diff] [blame] | 81 | android: { |
| 82 | // Only one copy of this library on an Android device |
| 83 | static: { |
| 84 | enabled: false, |
| 85 | }, |
| 86 | }, |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 87 | linux: { |
| 88 | version_script: "libbinder_ndk.map.txt", |
| 89 | }, |
Yifan Hong | f856a98 | 2020-10-30 14:51:17 -0700 | [diff] [blame^] | 90 | darwin: { |
| 91 | enabled: false, |
| 92 | }, |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 93 | }, |
Dongwon Kang | c45ac09 | 2018-12-11 21:59:02 +0000 | [diff] [blame] | 94 | stubs: { |
| 95 | symbol_file: "libbinder_ndk.map.txt", |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 96 | versions: [ |
| 97 | "29", |
| 98 | "30", |
| 99 | ], |
Dongwon Kang | c45ac09 | 2018-12-11 21:59:02 +0000 | [diff] [blame] | 100 | }, |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 101 | } |
Steven Moreland | eb0e9cc | 2018-08-29 01:52:09 -0700 | [diff] [blame] | 102 | |
| 103 | ndk_headers { |
| 104 | name: "libbinder_ndk_headers", |
| 105 | from: "include_ndk/android", |
| 106 | to: "android", |
| 107 | srcs: [ |
| 108 | "include_ndk/android/*.h", |
| 109 | ], |
| 110 | license: "NOTICE", |
| 111 | } |
| 112 | |
Steven Moreland | 34aac10 | 2020-07-07 23:24:45 +0000 | [diff] [blame] | 113 | // TODO(b/160624671): package with the aidl compiler |
| 114 | ndk_headers { |
| 115 | name: "libbinder_ndk_helper_headers", |
| 116 | from: "include_cpp/android", |
| 117 | to: "android", |
| 118 | srcs: [ |
| 119 | "include_cpp/android/*.h", |
| 120 | ], |
| 121 | license: "NOTICE", |
| 122 | } |
| 123 | |
Steven Moreland | eb0e9cc | 2018-08-29 01:52:09 -0700 | [diff] [blame] | 124 | ndk_library { |
| 125 | name: "libbinder_ndk", |
| 126 | symbol_file: "libbinder_ndk.map.txt", |
| 127 | first_version: "29", |
| 128 | } |
Steven Moreland | f1ac0ac | 2019-07-22 17:46:38 -0700 | [diff] [blame] | 129 | |
| 130 | llndk_library { |
Colin Cross | 8af6d1c | 2020-10-19 13:38:00 -0700 | [diff] [blame] | 131 | name: "libbinder_ndk.llndk", |
Steven Moreland | f1ac0ac | 2019-07-22 17:46:38 -0700 | [diff] [blame] | 132 | symbol_file: "libbinder_ndk.map.txt", |
| 133 | export_include_dirs: [ |
Steven Moreland | 34aac10 | 2020-07-07 23:24:45 +0000 | [diff] [blame] | 134 | "include_cpp", |
Steven Moreland | f1ac0ac | 2019-07-22 17:46:38 -0700 | [diff] [blame] | 135 | "include_ndk", |
Steven Moreland | 6b7ea2a | 2019-08-08 16:19:21 -0700 | [diff] [blame] | 136 | "include_platform", |
Steven Moreland | f1ac0ac | 2019-07-22 17:46:38 -0700 | [diff] [blame] | 137 | ], |
| 138 | } |