blob: be8c185e0a8cae1c2aa39220699d08543d53b00b [file] [log] [blame]
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -07001//
2// Copyright (C) 2018 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
Bob Badourdcbf8ca2021-02-03 22:55:55 -080017package {
Aditya Choudhary57c8f902024-02-02 14:02:31 +000018 default_team: "trendy_team_fwk_core_networking",
Bob Badourdcbf8ca2021-02-03 22:55:55 -080019 // http://go/android-license-faq
20 // A large-scale-change added 'default_applicable_licenses' to import
21 // the below license kinds from "system_bpf_license":
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["system_bpf_license"],
24}
25
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070026cc_library {
Chenbo Feng79a4da22018-11-08 11:32:31 -080027 name: "libbpf_android",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070028 vendor_available: false,
29 host_supported: false,
30 target: {
31 android: {
32 srcs: [
Joel Fernandesd76a2002018-10-16 13:19:58 -070033 "Loader.cpp",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070034 ],
35 sanitize: {
36 misc_undefined: ["integer"],
37 },
38 },
39 },
40
41 shared_libs: [
42 "libbase",
43 "libutils",
44 "liblog",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070045 ],
46 header_libs: [
Ken Chenfb045622021-12-21 15:36:25 +080047 "bpf_headers",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070048 ],
Ken Chenb1d48882021-10-25 21:11:22 +080049 export_header_lib_headers: [
Ken Chenfb045622021-12-21 15:36:25 +080050 "bpf_headers",
Ken Chenb1d48882021-10-25 21:11:22 +080051 ],
Maciej Żenczykowski07f02b52022-02-08 10:32:29 -080052 export_include_dirs: ["include"],
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070053
54 defaults: ["bpf_defaults"],
55 cflags: [
56 "-Werror",
57 "-Wall",
58 "-Wextra",
59 ],
60}
61
62cc_test {
Joel Fernandes48452882018-12-17 13:47:54 -080063 name: "libbpf_load_test",
Connor O'Brien74a02dd2022-01-27 23:46:49 -080064 test_suites: ["general-tests"],
Ken Chenfb045622021-12-21 15:36:25 +080065 header_libs: ["bpf_headers"],
Joel Fernandes48452882018-12-17 13:47:54 -080066 srcs: [
67 "BpfLoadTest.cpp",
68 ],
69 defaults: ["bpf_defaults"],
70 cflags: [
71 "-Wall",
72 "-Werror",
73 "-Wno-error=unused-variable",
74 ],
75 static_libs: ["libgmock"],
76 shared_libs: [
77 "libbpf_android",
Connor O'Brien474eb0b2021-11-22 17:45:40 -080078 "libbpf_bcc",
Joel Fernandes48452882018-12-17 13:47:54 -080079 "libbase",
80 "liblog",
Joel Fernandes48452882018-12-17 13:47:54 -080081 "libutils",
82 ],
83
Connor O'Brien50913142022-01-27 22:47:11 -080084 data: [
Ken Chen8693c782022-07-09 14:22:38 +080085 ":bpfLoadTpProg.o",
Joel Fernandes48452882018-12-17 13:47:54 -080086 ],
Steven Morelandcdeb9202020-01-14 11:36:43 -080087 require_root: true,
Joel Fernandes48452882018-12-17 13:47:54 -080088}