blob: 48189e079926ec0782c29b919e21d6208182b903 [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//
20cc_binary {
21 name: "bpfloader",
22
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070023 defaults: ["bpf_defaults"],
Chenbo Feng75b410b2018-10-10 15:01:19 -070024 cflags: [
25 "-Wall",
26 "-Werror",
27 "-Wthread-safety",
28 ],
29 sanitize: {
30 integer_overflow: true,
31 },
32 clang: true,
33 shared_libs: [
34 "libcutils",
35 "libbpf",
36 "libbase",
37 "liblog",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070038 "libnetdbpf",
Chenbo Feng75b410b2018-10-10 15:01:19 -070039 "libnetdutils",
40 ],
41 srcs: [
42 "BpfLoader.cpp",
43 ],
44
45 required: [
46 "bpf_kern.o",
47 ],
48
49}
50
51bpf {
52 name: "bpf_kern.o",
53 srcs: ["bpf_kern.c"],
54 cflags: [
55 "-Wall",
56 "-Werror",
57 ],
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070058 include_dirs: ["system/netd/libnetdbpf/include"],
Chenbo Feng75b410b2018-10-10 15:01:19 -070059}