blob: 72e0fec16046eec8efc25891701f4be9a1a4b604 [file] [log] [blame]
Chenbo Fengc10a8a42017-12-15 13:56:33 -08001//
2// Copyright (C) 2017 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
Chenbo Fengc10a8a42017-12-15 13:56:33 -080017cc_library {
Chenbo Fengd6104d12018-10-16 20:29:29 -070018 name: "libnetdbpf",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080019 vendor_available: false,
20 host_supported: false,
Bernie Innocentia2989112018-11-12 22:29:04 +090021 srcs: [
22 "BpfNetworkStats.cpp"
23 ],
Chenbo Fengc10a8a42017-12-15 13:56:33 -080024 shared_libs: [
25 "libbase",
Chenbo Fenga54aaf52018-11-07 17:51:51 -080026 "libbpf_android",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080027 "liblog",
28 "libnetdutils",
29 ],
Bernie Innocentia2989112018-11-12 22:29:04 +090030 export_include_dirs: ["include"],
Chenbo Fengd6104d12018-10-16 20:29:29 -070031 defaults: ["netd_defaults"],
Ken Chen2e413c32020-01-13 11:59:53 +080032 sanitize: {
33 cfi: true,
Ken Chen2e413c32020-01-13 11:59:53 +080034 },
Chenbo Fengc10a8a42017-12-15 13:56:33 -080035}
36
Chenbo Fengdc4e3252017-12-22 11:00:52 -080037cc_test {
Chenbo Fengd6104d12018-10-16 20:29:29 -070038 name: "libnetdbpf_test",
Bernie Innocenti86a883e2019-04-03 06:07:02 +000039 test_suites: ["device-tests"],
Bernie Innocenti83a67ca2019-06-19 16:28:05 +090040 require_root: true,
Chenbo Fengdc4e3252017-12-22 11:00:52 -080041 srcs: [
42 "BpfNetworkStatsTest.cpp",
43 ],
Erik Klineab999f12018-07-04 11:29:31 +090044 defaults: ["netd_defaults"],
Chenbo Fengdc4e3252017-12-22 11:00:52 -080045 static_libs: ["libgmock"],
46 shared_libs: [
Chenbo Fengdc4e3252017-12-22 11:00:52 -080047 "libbase",
Chenbo Fenga54aaf52018-11-07 17:51:51 -080048 "libbpf_android",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080049 "liblog",
Chenbo Fengd6104d12018-10-16 20:29:29 -070050 "libnetdbpf",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080051 "libnetdutils",
52 "libutils",
53 ],
54}