blob: 473c8c9429973d0147ee49b23d3a40f2f4e0b331 [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 {
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000017 default_team: "trendy_team_fwk_core_networking",
Bob Badour4ef4a442022-02-10 10:57:23 -080018 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Ken Chen1647f602021-10-05 21:55:22 +080021cc_library {
22 name: "libnetd_updatable",
23 version_script: "libnetd_updatable.map.txt",
24 stubs: {
25 versions: [
26 "1",
27 ],
28 symbol_file: "libnetd_updatable.map.txt",
29 },
30 defaults: ["netd_defaults"],
31 header_libs: [
32 "bpf_connectivity_headers",
33 "libcutils_headers",
34 ],
35 srcs: [
36 "BpfHandler.cpp",
37 "NetdUpdatable.cpp",
38 ],
Maciej Żenczykowski65075bb2023-06-01 23:09:14 +000039 static_libs: [
40 "libmodules-utils-build",
41 ],
Ken Chen1647f602021-10-05 21:55:22 +080042 shared_libs: [
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080043 "libbase",
Ken Chen1647f602021-10-05 21:55:22 +080044 "liblog",
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080045 "libnetdutils",
Ken Chen1647f602021-10-05 21:55:22 +080046 ],
47 export_include_dirs: ["include"],
48 header_abi_checker: {
49 enabled: true,
50 symbol_file: "libnetd_updatable.map.txt",
51 },
52 sanitize: {
53 cfi: true,
54 },
55 apex_available: ["com.android.tethering"],
56 min_sdk_version: "30",
57}
58
59cc_test {
60 name: "netd_updatable_unit_test",
61 defaults: ["netd_defaults"],
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000062 test_suites: [
63 "general-tests",
64 "mts-tethering",
65 ],
Ken Chenb9266bf2022-05-25 15:34:17 +080066 test_config_template: ":net_native_test_config_template",
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000067 require_root: true, // required by setrlimitForTest()
Ken Chen1647f602021-10-05 21:55:22 +080068 header_libs: [
69 "bpf_connectivity_headers",
70 ],
71 srcs: [
72 "BpfHandlerTest.cpp",
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000073 "BpfBaseTest.cpp",
Ken Chen1647f602021-10-05 21:55:22 +080074 ],
Ryan Prichard7b605932024-05-23 01:33:48 -070075 version_script: ":connectivity_mainline_test_map",
76 stl: "libc++_static",
Ken Chen1647f602021-10-05 21:55:22 +080077 static_libs: [
Henri Chataing6a7d8f92023-12-19 22:21:15 +000078 "libbase",
Ken Chen1647f602021-10-05 21:55:22 +080079 "libnetd_updatable",
80 ],
81 shared_libs: [
Ken Chen1647f602021-10-05 21:55:22 +080082 "libcutils",
83 "liblog",
84 "libnetdutils",
85 ],
Ken Chenb9266bf2022-05-25 15:34:17 +080086 compile_multilib: "both",
Ken Chen1647f602021-10-05 21:55:22 +080087 multilib: {
88 lib32: {
89 suffix: "32",
90 },
91 lib64: {
92 suffix: "64",
93 },
94 },
95}