blob: 3cdbc9780cfff2a2c795500fa3d44f9311d220dd [file] [log] [blame]
Ken Chen1647f602021-10-05 21:55:22 +08001//
2// Copyright (C) 2022 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
Bob Badour4ef4a442022-02-10 10:57:23 -080016package {
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
Ken Chen1647f602021-10-05 21:55:22 +080020cc_library {
21 name: "libnetd_updatable",
22 version_script: "libnetd_updatable.map.txt",
23 stubs: {
24 versions: [
25 "1",
26 ],
27 symbol_file: "libnetd_updatable.map.txt",
28 },
29 defaults: ["netd_defaults"],
30 header_libs: [
31 "bpf_connectivity_headers",
32 "libcutils_headers",
33 ],
34 srcs: [
35 "BpfHandler.cpp",
36 "NetdUpdatable.cpp",
37 ],
Maciej Żenczykowski65075bb2023-06-01 23:09:14 +000038 static_libs: [
39 "libmodules-utils-build",
40 ],
Ken Chen1647f602021-10-05 21:55:22 +080041 shared_libs: [
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080042 "libbase",
Ken Chen1647f602021-10-05 21:55:22 +080043 "liblog",
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080044 "libnetdutils",
Ken Chen1647f602021-10-05 21:55:22 +080045 ],
46 export_include_dirs: ["include"],
47 header_abi_checker: {
48 enabled: true,
49 symbol_file: "libnetd_updatable.map.txt",
50 },
51 sanitize: {
52 cfi: true,
53 },
54 apex_available: ["com.android.tethering"],
55 min_sdk_version: "30",
56}
57
58cc_test {
59 name: "netd_updatable_unit_test",
60 defaults: ["netd_defaults"],
Ken Chenb9266bf2022-05-25 15:34:17 +080061 test_suites: ["general-tests", "mts-tethering"],
62 test_config_template: ":net_native_test_config_template",
Ken Chen1647f602021-10-05 21:55:22 +080063 require_root: true, // required by setrlimitForTest()
64 header_libs: [
65 "bpf_connectivity_headers",
66 ],
67 srcs: [
68 "BpfHandlerTest.cpp",
Maciej Żenczykowski70d30ec2022-12-19 14:50:18 -080069 "BpfBaseTest.cpp"
Ken Chen1647f602021-10-05 21:55:22 +080070 ],
71 static_libs: [
Henri Chataing6a7d8f92023-12-19 22:21:15 +000072 "libbase",
Ken Chen1647f602021-10-05 21:55:22 +080073 "libnetd_updatable",
74 ],
75 shared_libs: [
Ken Chen1647f602021-10-05 21:55:22 +080076 "libcutils",
77 "liblog",
78 "libnetdutils",
Maciej Żenczykowski70d30ec2022-12-19 14:50:18 -080079 "libprocessgroup",
Ken Chen1647f602021-10-05 21:55:22 +080080 ],
Ken Chenb9266bf2022-05-25 15:34:17 +080081 compile_multilib: "both",
Ken Chen1647f602021-10-05 21:55:22 +080082 multilib: {
83 lib32: {
84 suffix: "32",
85 },
86 lib64: {
87 suffix: "64",
88 },
89 },
90}