Chenbo Feng | c10a8a4 | 2017-12-15 13:56:33 -0800 | [diff] [blame] | 1 | // |
| 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 Feng | c10a8a4 | 2017-12-15 13:56:33 -0800 | [diff] [blame] | 17 | cc_library { |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 18 | name: "libnetdbpf", |
Chenbo Feng | c10a8a4 | 2017-12-15 13:56:33 -0800 | [diff] [blame] | 19 | vendor_available: false, |
| 20 | host_supported: false, |
Bernie Innocenti | a298911 | 2018-11-12 22:29:04 +0900 | [diff] [blame] | 21 | srcs: [ |
| 22 | "BpfNetworkStats.cpp" |
| 23 | ], |
Chenbo Feng | c10a8a4 | 2017-12-15 13:56:33 -0800 | [diff] [blame] | 24 | shared_libs: [ |
| 25 | "libbase", |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 26 | "libbpf_android", |
Chenbo Feng | c10a8a4 | 2017-12-15 13:56:33 -0800 | [diff] [blame] | 27 | "liblog", |
| 28 | "libnetdutils", |
| 29 | ], |
Bernie Innocenti | a298911 | 2018-11-12 22:29:04 +0900 | [diff] [blame] | 30 | export_include_dirs: ["include"], |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 31 | defaults: ["netd_defaults"], |
Ken Chen | 2e413c3 | 2020-01-13 11:59:53 +0800 | [diff] [blame] | 32 | sanitize: { |
| 33 | cfi: true, |
Ken Chen | 2e413c3 | 2020-01-13 11:59:53 +0800 | [diff] [blame] | 34 | }, |
Chenbo Feng | c10a8a4 | 2017-12-15 13:56:33 -0800 | [diff] [blame] | 35 | } |
| 36 | |
Chenbo Feng | dc4e325 | 2017-12-22 11:00:52 -0800 | [diff] [blame] | 37 | cc_test { |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 38 | name: "libnetdbpf_test", |
Bernie Innocenti | 86a883e | 2019-04-03 06:07:02 +0000 | [diff] [blame] | 39 | test_suites: ["device-tests"], |
Bernie Innocenti | 83a67ca | 2019-06-19 16:28:05 +0900 | [diff] [blame] | 40 | require_root: true, |
Chenbo Feng | dc4e325 | 2017-12-22 11:00:52 -0800 | [diff] [blame] | 41 | srcs: [ |
| 42 | "BpfNetworkStatsTest.cpp", |
| 43 | ], |
Erik Kline | ab999f1 | 2018-07-04 11:29:31 +0900 | [diff] [blame] | 44 | defaults: ["netd_defaults"], |
Chenbo Feng | dc4e325 | 2017-12-22 11:00:52 -0800 | [diff] [blame] | 45 | static_libs: ["libgmock"], |
| 46 | shared_libs: [ |
Chenbo Feng | dc4e325 | 2017-12-22 11:00:52 -0800 | [diff] [blame] | 47 | "libbase", |
Chenbo Feng | a54aaf5 | 2018-11-07 17:51:51 -0800 | [diff] [blame] | 48 | "libbpf_android", |
Chenbo Feng | dc4e325 | 2017-12-22 11:00:52 -0800 | [diff] [blame] | 49 | "liblog", |
Chenbo Feng | d6104d1 | 2018-10-16 20:29:29 -0700 | [diff] [blame] | 50 | "libnetdbpf", |
Chenbo Feng | dc4e325 | 2017-12-22 11:00:52 -0800 | [diff] [blame] | 51 | "libnetdutils", |
| 52 | "libutils", |
| 53 | ], |
| 54 | } |