| Maciej Żenczykowski | 40dfe53 | 2023-10-08 20:21:11 -0700 | [diff] [blame] | 1 | // | 
|  | 2 | // Copyright (C) 2023 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 |  | 
|  | 17 | cc_binary { | 
|  | 18 | name: "netbpfload", | 
|  | 19 |  | 
|  | 20 | defaults: ["bpf_defaults"], | 
|  | 21 | cflags: [ | 
|  | 22 | "-Wall", | 
|  | 23 | "-Werror", | 
|  | 24 | "-Wthread-safety", | 
|  | 25 | ], | 
|  | 26 | sanitize: { | 
|  | 27 | integer_overflow: true, | 
|  | 28 | }, | 
|  | 29 |  | 
|  | 30 | header_libs: ["bpf_headers"], | 
|  | 31 | shared_libs: [ | 
|  | 32 | "libbase", | 
| Maciej Żenczykowski | 40dfe53 | 2023-10-08 20:21:11 -0700 | [diff] [blame] | 33 | "liblog", | 
|  | 34 | ], | 
|  | 35 | srcs: [ | 
|  | 36 | "loader.cpp", | 
|  | 37 | "NetBpfLoad.cpp", | 
|  | 38 | ], | 
| Maciej Żenczykowski | a2a3d75 | 2023-10-10 15:24:13 -0700 | [diff] [blame] | 39 | apex_available: [ | 
|  | 40 | "com.android.tethering", | 
|  | 41 | "//apex_available:platform", | 
|  | 42 | ], | 
|  | 43 | // really should be Android 14/U (34), but we cannot include binaries built | 
|  | 44 | // against newer sdk in the apex, which still targets 30(R): | 
|  | 45 | // module "netbpfload" variant "android_x86_apex30": should support | 
|  | 46 | // min_sdk_version(30) for "com.android.tethering": newer SDK(34). | 
|  | 47 | min_sdk_version: "30", | 
| Maciej Żenczykowski | 7db65c6 | 2023-10-19 16:51:15 -0700 | [diff] [blame] | 48 |  | 
| Maciej Żenczykowski | 7da54d9 | 2023-10-24 02:11:09 -0700 | [diff] [blame] | 49 | init_rc: ["netbpfload.rc"], | 
|  | 50 | required: ["bpfloader"], | 
| Maciej Żenczykowski | 40dfe53 | 2023-10-08 20:21:11 -0700 | [diff] [blame] | 51 | } |