blob: c731b8bad40ebf2b11cb9d8d5ffe735cf8220ee3 [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 ],
Ken Chen1647f602021-10-05 21:55:22 +080038 shared_libs: [
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080039 "libbase",
Ken Chen1647f602021-10-05 21:55:22 +080040 "liblog",
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080041 "libnetdutils",
Ken Chen1647f602021-10-05 21:55:22 +080042 ],
43 export_include_dirs: ["include"],
44 header_abi_checker: {
45 enabled: true,
46 symbol_file: "libnetd_updatable.map.txt",
47 },
48 sanitize: {
49 cfi: true,
50 },
51 apex_available: ["com.android.tethering"],
52 min_sdk_version: "30",
53}
54
55cc_test {
56 name: "netd_updatable_unit_test",
57 defaults: ["netd_defaults"],
Ken Chenb9266bf2022-05-25 15:34:17 +080058 test_suites: ["general-tests", "mts-tethering"],
59 test_config_template: ":net_native_test_config_template",
Ken Chen1647f602021-10-05 21:55:22 +080060 require_root: true, // required by setrlimitForTest()
61 header_libs: [
62 "bpf_connectivity_headers",
63 ],
64 srcs: [
65 "BpfHandlerTest.cpp",
66 ],
67 static_libs: [
68 "libnetd_updatable",
69 ],
70 shared_libs: [
71 "libbase",
72 "libcutils",
73 "liblog",
74 "libnetdutils",
75 ],
Ken Chenb9266bf2022-05-25 15:34:17 +080076 compile_multilib: "both",
Ken Chen1647f602021-10-05 21:55:22 +080077 multilib: {
78 lib32: {
79 suffix: "32",
80 },
81 lib64: {
82 suffix: "64",
83 },
84 },
85}