blob: 037750ee4393cc557b4680de3624c4bf64664c8a [file] [log] [blame]
Maciej Żenczykowski40dfe532023-10-08 20:21:11 -07001//
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
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000017package {
18 default_team: "trendy_team_fwk_core_networking",
19}
20
Maciej Żenczykowski40dfe532023-10-08 20:21:11 -070021cc_binary {
22 name: "netbpfload",
23
24 defaults: ["bpf_defaults"],
25 cflags: [
26 "-Wall",
27 "-Werror",
28 "-Wthread-safety",
29 ],
30 sanitize: {
31 integer_overflow: true,
32 },
33
34 header_libs: ["bpf_headers"],
35 shared_libs: [
36 "libbase",
Maciej Żenczykowski40dfe532023-10-08 20:21:11 -070037 "liblog",
38 ],
39 srcs: [
40 "loader.cpp",
41 "NetBpfLoad.cpp",
42 ],
Maciej Żenczykowskia2a3d752023-10-10 15:24:13 -070043 apex_available: [
44 "com.android.tethering",
45 "//apex_available:platform",
46 ],
47 // really should be Android 14/U (34), but we cannot include binaries built
48 // against newer sdk in the apex, which still targets 30(R):
49 // module "netbpfload" variant "android_x86_apex30": should support
50 // min_sdk_version(30) for "com.android.tethering": newer SDK(34).
51 min_sdk_version: "30",
Maciej Żenczykowski7db65c62023-10-19 16:51:15 -070052
Maciej Żenczykowski7da54d92023-10-24 02:11:09 -070053 init_rc: ["netbpfload.rc"],
54 required: ["bpfloader"],
Maciej Żenczykowski40dfe532023-10-08 20:21:11 -070055}