blob: 5b3d3149624115f2a6961905ec37fb591396a0da [file] [log] [blame]
Ken Chenf2bb7b12022-01-22 19:17:20 +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
17package {
Ken Chenf426b2b2022-01-23 15:39:13 +080018 default_applicable_licenses: ["Android-Apache-2.0"],
Ken Chenf2bb7b12022-01-22 19:17:20 +080019}
20
21cc_library {
Ken Chenf426b2b2022-01-23 15:39:13 +080022 name: "libnetworkstats",
Ken Chenf2bb7b12022-01-22 19:17:20 +080023 vendor_available: false,
24 host_supported: false,
25 header_libs: ["bpf_connectivity_headers"],
26 srcs: [
27 "BpfNetworkStats.cpp"
28 ],
29 shared_libs: [
30 "libbase",
31 "liblog",
Ken Chenf2bb7b12022-01-22 19:17:20 +080032 ],
33 export_include_dirs: ["include"],
Ken Chenf426b2b2022-01-23 15:39:13 +080034 cflags: [
35 "-Wall",
36 "-Werror",
37 "-Wno-unused-parameter",
38 "-Wthread-safety",
39 ],
Ken Chenf2bb7b12022-01-22 19:17:20 +080040 sanitize: {
41 cfi: true,
42 },
Ken Chenf426b2b2022-01-23 15:39:13 +080043 apex_available: [
Ken Chenf426b2b2022-01-23 15:39:13 +080044 "com.android.tethering",
45 ],
46 min_sdk_version: "30",
Ken Chenf2bb7b12022-01-22 19:17:20 +080047}
48
49cc_test {
Ken Chenf426b2b2022-01-23 15:39:13 +080050 name: "libnetworkstats_test",
Ken Chenb9266bf2022-05-25 15:34:17 +080051 test_suites: ["general-tests", "mts-tethering"],
52 test_config_template: ":net_native_test_config_template",
Ken Chenf426b2b2022-01-23 15:39:13 +080053 require_root: true, // required by setrlimitForTest()
Ken Chenf2bb7b12022-01-22 19:17:20 +080054 header_libs: ["bpf_connectivity_headers"],
55 srcs: [
56 "BpfNetworkStatsTest.cpp",
57 ],
Ken Chenf426b2b2022-01-23 15:39:13 +080058 cflags: [
59 "-Wall",
60 "-Werror",
61 "-Wno-unused-parameter",
62 "-Wthread-safety",
63 ],
Lorenzo Colitti0db496e2022-02-07 09:01:37 +090064 static_libs: [
65 "libgmock",
66 "libnetworkstats",
67 ],
Ken Chenf2bb7b12022-01-22 19:17:20 +080068 shared_libs: [
69 "libbase",
70 "liblog",
Ken Chenf2bb7b12022-01-22 19:17:20 +080071 ],
Ken Chenb9266bf2022-05-25 15:34:17 +080072 compile_multilib: "both",
73 multilib: {
74 lib32: {
75 suffix: "32",
76 },
77 lib64: {
78 suffix: "64",
79 },
80 },
Ken Chenf2bb7b12022-01-22 19:17:20 +080081}