blob: 04f5b51f2108544a028053d37f92b8c5d2ed009e [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,
34 diag: {
35 cfi: true,
36 },
37 },
Chenbo Fengc10a8a42017-12-15 13:56:33 -080038}
39
Chenbo Fengdc4e3252017-12-22 11:00:52 -080040cc_test {
Chenbo Fengd6104d12018-10-16 20:29:29 -070041 name: "libnetdbpf_test",
Bernie Innocenti86a883e2019-04-03 06:07:02 +000042 test_suites: ["device-tests"],
Bernie Innocenti83a67ca2019-06-19 16:28:05 +090043 require_root: true,
Chenbo Fengdc4e3252017-12-22 11:00:52 -080044 srcs: [
45 "BpfNetworkStatsTest.cpp",
46 ],
Erik Klineab999f12018-07-04 11:29:31 +090047 defaults: ["netd_defaults"],
Chenbo Fengdc4e3252017-12-22 11:00:52 -080048 static_libs: ["libgmock"],
49 shared_libs: [
Chenbo Fengdc4e3252017-12-22 11:00:52 -080050 "libbase",
Chenbo Fenga54aaf52018-11-07 17:51:51 -080051 "libbpf_android",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080052 "liblog",
Chenbo Fengd6104d12018-10-16 20:29:29 -070053 "libnetdbpf",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080054 "libnetdutils",
55 "libutils",
56 ],
57}