blob: 4ec4d581e959b5614c534f03197fe5525c45977a [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",
Ken Chende0bb522021-10-25 20:49:37 +080021 vendor_available: true,
22 host_supported: true,
23 native_bridge_supported: true,
24 export_include_dirs: ["include"],
25 cflags: [
26 "-Wall",
27 "-Werror",
28 ],
29 min_sdk_version: "30",
30 apex_available: [
31 "//apex_available:platform",
Ken Cheneb911f12021-10-29 11:15:28 +080032 "com.android.tethering",
Ken Chende0bb522021-10-25 20:49:37 +080033 "com.android.art.debug",
34 ],
35 visibility: [
36 "//bootable/libbootloader/vts",
37 "//frameworks/base/services/core/jni",
38 "//frameworks/native/libs/cputimeinstate",
39 "//frameworks/native/services/gpuservice",
40 "//frameworks/native/services/gpuservice/gpumem",
41 "//frameworks/native/services/gpuservice/tests/unittests",
42 "//frameworks/native/services/gpuservice/tracing",
Ken Cheneb911f12021-10-29 11:15:28 +080043 "//packages/modules/Connectivity/netd",
Ken Chende0bb522021-10-25 20:49:37 +080044 "//packages/modules/Connectivity/tests/unit/jni",
45 "//packages/modules/DnsResolver/tests",
46 "//system/bpf/bpfloader",
47 "//system/bpf/libbpf_android",
48 "//system/memory/libmeminfo",
49 "//system/netd/libnetdbpf",
50 "//system/netd/server",
51 "//system/netd/tests",
52 "//system/netd/tests/benchmarks",
53 "//test/vts-testcase/kernel/api/bpf_native_test",
54 ],
55}
56
57
58cc_test {
59 // TODO: Rename to bpf_map_test and modify .gcls as well.
60 name: "libbpf_android_test",
61 srcs: [
62 "BpfMapTest.cpp",
63 ],
64 defaults: ["bpf_defaults"],
65 cflags: [
66 "-Wall",
67 "-Werror",
68 "-Wno-error=unused-variable",
69 ],
70 static_libs: ["libgmock"],
71 shared_libs: [
72 "libbpf_android",
73 "libbase",
74 "liblog",
75 "libutils",
76 ],
77 require_root: true,
78 test_suites: ["general-tests"],
79}