blob: d55584ac5944061c23dbb1ea43655a8aae280bad [file] [log] [blame]
Ken Chende0bb522021-10-25 20:49:37 +08001// Copyright (C) 2021 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 Badour2b71c972021-12-09 13:57:00 -080015package {
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000016 default_team: "trendy_team_fwk_core_networking",
Bob Badour2b71c972021-12-09 13:57:00 -080017 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
Ken Chende0bb522021-10-25 20:49:37 +080020cc_library_headers {
Ken Chen0f1ee4c2021-12-21 15:58:45 +080021 name: "bpf_headers",
Steven Morelandb0df1892022-02-08 00:11:14 +000022 vendor_available: true,
Stephane Lee4806feb2022-03-08 17:32:12 -080023 recovery_available: true,
Ken Chende0bb522021-10-25 20:49:37 +080024 host_supported: true,
25 native_bridge_supported: true,
Maciej Żenczykowski15d8ebe2021-12-23 22:41:21 -080026 header_libs: ["bpf_syscall_wrappers"],
27 export_header_lib_headers: ["bpf_syscall_wrappers"],
Ken Chende0bb522021-10-25 20:49:37 +080028 export_include_dirs: ["include"],
29 cflags: [
30 "-Wall",
31 "-Werror",
32 ],
Maciej Żenczykowski15d8ebe2021-12-23 22:41:21 -080033 sdk_version: "30",
Ken Chende0bb522021-10-25 20:49:37 +080034 min_sdk_version: "30",
35 apex_available: [
36 "//apex_available:platform",
37 "com.android.art.debug",
Patrick Rohr93312c92023-05-18 14:34:36 -070038 "com.android.os.statsd",
39 "com.android.resolv",
40 "com.android.tethering",
Ken Chende0bb522021-10-25 20:49:37 +080041 ],
Ken Chende0bb522021-10-25 20:49:37 +080042}
43
Ken Chende0bb522021-10-25 20:49:37 +080044cc_test {
45 // TODO: Rename to bpf_map_test and modify .gcls as well.
46 name: "libbpf_android_test",
47 srcs: [
48 "BpfMapTest.cpp",
Ryan Zuklieccd5eb92022-11-30 10:21:47 -080049 "BpfRingbufTest.cpp",
Ken Chende0bb522021-10-25 20:49:37 +080050 ],
51 defaults: ["bpf_defaults"],
52 cflags: [
53 "-Wall",
54 "-Werror",
55 "-Wno-error=unused-variable",
56 ],
Maciej Żenczykowskic8050042022-02-09 19:05:53 -080057 header_libs: ["bpf_headers"],
Ken Chende0bb522021-10-25 20:49:37 +080058 static_libs: ["libgmock"],
59 shared_libs: [
Ken Chende0bb522021-10-25 20:49:37 +080060 "libbase",
61 "liblog",
62 "libutils",
63 ],
64 require_root: true,
65 test_suites: ["general-tests"],
66}