blob: 834ef02b49a6fabed2b3ec04596e00c27145fb2a [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 {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Ken Chende0bb522021-10-25 20:49:37 +080019cc_library_headers {
Ken Chen0f1ee4c2021-12-21 15:58:45 +080020 name: "bpf_headers",
Steven Morelandb0df1892022-02-08 00:11:14 +000021 vendor_available: true,
Ken Chende0bb522021-10-25 20:49:37 +080022 host_supported: true,
23 native_bridge_supported: true,
Maciej Żenczykowski15d8ebe2021-12-23 22:41:21 -080024 header_libs: ["bpf_syscall_wrappers"],
25 export_header_lib_headers: ["bpf_syscall_wrappers"],
Ken Chende0bb522021-10-25 20:49:37 +080026 export_include_dirs: ["include"],
27 cflags: [
28 "-Wall",
29 "-Werror",
30 ],
Maciej Żenczykowski15d8ebe2021-12-23 22:41:21 -080031 sdk_version: "30",
Ken Chende0bb522021-10-25 20:49:37 +080032 min_sdk_version: "30",
33 apex_available: [
34 "//apex_available:platform",
Ken Cheneb911f12021-10-29 11:15:28 +080035 "com.android.tethering",
Ken Chende0bb522021-10-25 20:49:37 +080036 "com.android.art.debug",
37 ],
38 visibility: [
39 "//bootable/libbootloader/vts",
Ken Chena973c0b2022-01-09 20:24:54 +080040 "//cts/tests/tests/net/native",
Ken Chende0bb522021-10-25 20:49:37 +080041 "//frameworks/base/services/core/jni",
42 "//frameworks/native/libs/cputimeinstate",
43 "//frameworks/native/services/gpuservice",
44 "//frameworks/native/services/gpuservice/gpumem",
45 "//frameworks/native/services/gpuservice/tests/unittests",
46 "//frameworks/native/services/gpuservice/tracing",
Maciej Żenczykowski15d8ebe2021-12-23 22:41:21 -080047 "//packages/modules/Connectivity/bpf_progs",
Ken Cheneb911f12021-10-29 11:15:28 +080048 "//packages/modules/Connectivity/netd",
Wayne Ma67a69e72022-01-12 11:44:27 +080049 "//packages/modules/Connectivity/service/native",
Hungming Chen51fecf12022-01-25 20:08:43 +080050 "//packages/modules/Connectivity/service/native/libs/libclat",
Ken Chende0bb522021-10-25 20:49:37 +080051 "//packages/modules/Connectivity/tests/unit/jni",
52 "//packages/modules/DnsResolver/tests",
53 "//system/bpf/bpfloader",
54 "//system/bpf/libbpf_android",
55 "//system/memory/libmeminfo",
Ken Chende0bb522021-10-25 20:49:37 +080056 "//system/netd/server",
57 "//system/netd/tests",
58 "//system/netd/tests/benchmarks",
59 "//test/vts-testcase/kernel/api/bpf_native_test",
60 ],
61}
62
63
64cc_test {
65 // TODO: Rename to bpf_map_test and modify .gcls as well.
66 name: "libbpf_android_test",
67 srcs: [
68 "BpfMapTest.cpp",
69 ],
70 defaults: ["bpf_defaults"],
71 cflags: [
72 "-Wall",
73 "-Werror",
74 "-Wno-error=unused-variable",
75 ],
76 static_libs: ["libgmock"],
77 shared_libs: [
78 "libbpf_android",
79 "libbase",
80 "liblog",
81 "libutils",
82 ],
83 require_root: true,
84 test_suites: ["general-tests"],
85}