1// 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 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19cc_library_headers { 20 name: "bpf_headers", 21 vendor_available: true, 22 recovery_available: true, 23 host_supported: true, 24 native_bridge_supported: true, 25 header_libs: ["bpf_syscall_wrappers"], 26 export_header_lib_headers: ["bpf_syscall_wrappers"], 27 export_include_dirs: ["include"], 28 cflags: [ 29 "-Wall", 30 "-Werror", 31 ], 32 sdk_version: "30", 33 min_sdk_version: "30", 34 apex_available: [ 35 "//apex_available:platform", 36 "com.android.art.debug", 37 "com.android.os.statsd", 38 "com.android.resolv", 39 "com.android.tethering", 40 ], 41} 42 43cc_test { 44 // TODO: Rename to bpf_map_test and modify .gcls as well. 45 name: "libbpf_android_test", 46 srcs: [ 47 "BpfMapTest.cpp", 48 "BpfRingbufTest.cpp", 49 ], 50 defaults: ["bpf_defaults"], 51 cflags: [ 52 "-Wall", 53 "-Werror", 54 "-Wno-error=unused-variable", 55 ], 56 header_libs: ["bpf_headers"], 57 static_libs: ["libgmock"], 58 shared_libs: [ 59 "libbase", 60 "liblog", 61 "libutils", 62 ], 63 require_root: true, 64 test_suites: ["general-tests"], 65} 66