Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 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 | |
Bob Badour | 2b71c97 | 2021-12-09 13:57:00 -0800 | [diff] [blame] | 15 | package { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 16 | default_team: "trendy_team_fwk_core_networking", |
Bob Badour | 2b71c97 | 2021-12-09 13:57:00 -0800 | [diff] [blame] | 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 20 | cc_library_headers { |
Ken Chen | 0f1ee4c | 2021-12-21 15:58:45 +0800 | [diff] [blame] | 21 | name: "bpf_headers", |
Steven Moreland | b0df189 | 2022-02-08 00:11:14 +0000 | [diff] [blame] | 22 | vendor_available: true, |
Stephane Lee | 4806feb | 2022-03-08 17:32:12 -0800 | [diff] [blame] | 23 | recovery_available: true, |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 24 | host_supported: true, |
| 25 | native_bridge_supported: true, |
Maciej Żenczykowski | 15d8ebe | 2021-12-23 22:41:21 -0800 | [diff] [blame] | 26 | header_libs: ["bpf_syscall_wrappers"], |
| 27 | export_header_lib_headers: ["bpf_syscall_wrappers"], |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 28 | export_include_dirs: ["include"], |
| 29 | cflags: [ |
| 30 | "-Wall", |
| 31 | "-Werror", |
| 32 | ], |
Maciej Żenczykowski | 15d8ebe | 2021-12-23 22:41:21 -0800 | [diff] [blame] | 33 | sdk_version: "30", |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 34 | min_sdk_version: "30", |
| 35 | apex_available: [ |
| 36 | "//apex_available:platform", |
| 37 | "com.android.art.debug", |
Patrick Rohr | 93312c9 | 2023-05-18 14:34:36 -0700 | [diff] [blame] | 38 | "com.android.os.statsd", |
| 39 | "com.android.resolv", |
| 40 | "com.android.tethering", |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 41 | ], |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 42 | } |
| 43 | |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 44 | cc_test { |
| 45 | // TODO: Rename to bpf_map_test and modify .gcls as well. |
| 46 | name: "libbpf_android_test", |
| 47 | srcs: [ |
| 48 | "BpfMapTest.cpp", |
Ryan Zuklie | ccd5eb9 | 2022-11-30 10:21:47 -0800 | [diff] [blame] | 49 | "BpfRingbufTest.cpp", |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 50 | ], |
Neill Kapron | 661ae85 | 2024-09-13 16:39:45 +0000 | [diff] [blame] | 51 | defaults: ["bpf_cc_defaults"], |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 52 | cflags: [ |
Neill Kapron | 661ae85 | 2024-09-13 16:39:45 +0000 | [diff] [blame] | 53 | "-Wno-unused-variable", |
| 54 | "-Wno-sign-compare", |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 55 | ], |
Maciej Żenczykowski | c805004 | 2022-02-09 19:05:53 -0800 | [diff] [blame] | 56 | header_libs: ["bpf_headers"], |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 57 | static_libs: ["libgmock"], |
| 58 | shared_libs: [ |
Ken Chen | de0bb52 | 2021-10-25 20:49:37 +0800 | [diff] [blame] | 59 | "libbase", |
| 60 | "liblog", |
| 61 | "libutils", |
| 62 | ], |
| 63 | require_root: true, |
| 64 | test_suites: ["general-tests"], |
| 65 | } |