blob: 18954eb6c3388cd89bd0c47d27eab735adebedfb [file] [log] [blame]
Chenbo Feng75b410b2018-10-10 15:01:19 -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
17//
18// bpfLoad binary
19//
Bob Badourdcbf8ca2021-02-03 22:55:55 -080020package {
21 // http://go/android-license-faq
22 // A large-scale-change added 'default_applicable_licenses' to import
23 // the below license kinds from "system_bpf_license":
24 // SPDX-license-identifier-Apache-2.0
25 default_applicable_licenses: ["system_bpf_license"],
26}
27
Chenbo Feng75b410b2018-10-10 15:01:19 -070028cc_binary {
29 name: "bpfloader",
30
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070031 defaults: ["bpf_defaults"],
Chenbo Feng75b410b2018-10-10 15:01:19 -070032 cflags: [
33 "-Wall",
34 "-Werror",
35 "-Wthread-safety",
36 ],
37 sanitize: {
38 integer_overflow: true,
39 },
Alix8849bb12022-04-18 03:57:58 +000040
Ken Chenfb045622021-12-21 15:36:25 +080041 header_libs: ["bpf_headers"],
Chenbo Feng75b410b2018-10-10 15:01:19 -070042 shared_libs: [
43 "libcutils",
Chenbo Feng79a4da22018-11-08 11:32:31 -080044 "libbpf_android",
Chenbo Feng75b410b2018-10-10 15:01:19 -070045 "libbase",
46 "liblog",
47 "libnetdutils",
48 ],
49 srcs: [
50 "BpfLoader.cpp",
51 ],
52
Joel Fernandes6e1341e2018-11-29 11:36:13 -080053 init_rc: ["bpfloader.rc"],
54
Chenbo Feng75b410b2018-10-10 15:01:19 -070055 required: [
Ken Chen498d20b2022-07-10 19:10:36 +080056 "timeInState.o"
Chenbo Feng75b410b2018-10-10 15:01:19 -070057 ],
58
Ryan Zuklie65748202022-12-07 18:22:21 -080059 product_variables: {
60 debuggable: {
61 required: [
62 "bpfRingbufProg.o",
63 ],
64 },
65 }
Chenbo Feng75b410b2018-10-10 15:01:19 -070066}