blob: 52fb04305141983d708b798cd99e5969f66f8891 [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 {
18 // http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // the below license kinds from "system_bpf_license":
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: ["system_bpf_license"],
23}
24
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070025cc_library {
Chenbo Feng79a4da22018-11-08 11:32:31 -080026 name: "libbpf_android",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070027 vendor_available: false,
28 host_supported: false,
29 target: {
30 android: {
31 srcs: [
Joel Fernandesd76a2002018-10-16 13:19:58 -070032 "Loader.cpp",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070033 ],
34 sanitize: {
35 misc_undefined: ["integer"],
36 },
37 },
38 },
39
40 shared_libs: [
41 "libbase",
42 "libutils",
43 "liblog",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070044 ],
45 header_libs: [
Ken Chenfb045622021-12-21 15:36:25 +080046 "bpf_headers",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070047 ],
Ken Chenb1d48882021-10-25 21:11:22 +080048 export_header_lib_headers: [
Ken Chenfb045622021-12-21 15:36:25 +080049 "bpf_headers",
Ken Chenb1d48882021-10-25 21:11:22 +080050 ],
Maciej Żenczykowski07f02b52022-02-08 10:32:29 -080051 export_include_dirs: ["include"],
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070052
53 defaults: ["bpf_defaults"],
54 cflags: [
55 "-Werror",
56 "-Wall",
57 "-Wextra",
58 ],
59}
60
61cc_test {
Joel Fernandes48452882018-12-17 13:47:54 -080062 name: "libbpf_load_test",
Connor O'Brien74a02dd2022-01-27 23:46:49 -080063 test_suites: ["general-tests"],
Ken Chenfb045622021-12-21 15:36:25 +080064 header_libs: ["bpf_headers"],
Joel Fernandes48452882018-12-17 13:47:54 -080065 srcs: [
66 "BpfLoadTest.cpp",
67 ],
68 defaults: ["bpf_defaults"],
69 cflags: [
70 "-Wall",
71 "-Werror",
72 "-Wno-error=unused-variable",
73 ],
74 static_libs: ["libgmock"],
75 shared_libs: [
76 "libbpf_android",
Connor O'Brien474eb0b2021-11-22 17:45:40 -080077 "libbpf_bcc",
Joel Fernandes48452882018-12-17 13:47:54 -080078 "libbase",
79 "liblog",
Joel Fernandes48452882018-12-17 13:47:54 -080080 "libutils",
81 ],
82
Connor O'Brien50913142022-01-27 22:47:11 -080083 data: [
Ken Chen8693c782022-07-09 14:22:38 +080084 ":bpfLoadTpProg.o",
Joel Fernandes48452882018-12-17 13:47:54 -080085 ],
Steven Morelandcdeb9202020-01-14 11:36:43 -080086 require_root: true,
Joel Fernandes48452882018-12-17 13:47:54 -080087}