blob: b98a85954e3ee7826ec63da64cbadc34bb26f945 [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
16cc_library {
17 name: "libnetd_updatable",
18 version_script: "libnetd_updatable.map.txt",
19 stubs: {
20 versions: [
21 "1",
22 ],
23 symbol_file: "libnetd_updatable.map.txt",
24 },
25 defaults: ["netd_defaults"],
26 header_libs: [
27 "bpf_connectivity_headers",
28 "libcutils_headers",
29 ],
30 srcs: [
31 "BpfHandler.cpp",
32 "NetdUpdatable.cpp",
33 ],
Ken Chen1647f602021-10-05 21:55:22 +080034 shared_libs: [
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080035 "libbase",
Ken Chen1647f602021-10-05 21:55:22 +080036 "liblog",
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080037 "libnetdutils",
Ken Chen1647f602021-10-05 21:55:22 +080038 ],
39 export_include_dirs: ["include"],
40 header_abi_checker: {
41 enabled: true,
42 symbol_file: "libnetd_updatable.map.txt",
43 },
44 sanitize: {
45 cfi: true,
46 },
47 apex_available: ["com.android.tethering"],
48 min_sdk_version: "30",
49}
50
51cc_test {
52 name: "netd_updatable_unit_test",
53 defaults: ["netd_defaults"],
54 test_suites: ["general-tests"],
55 require_root: true, // required by setrlimitForTest()
56 header_libs: [
57 "bpf_connectivity_headers",
58 ],
59 srcs: [
60 "BpfHandlerTest.cpp",
61 ],
62 static_libs: [
63 "libnetd_updatable",
64 ],
65 shared_libs: [
66 "libbase",
67 "libcutils",
68 "liblog",
69 "libnetdutils",
70 ],
71 multilib: {
72 lib32: {
73 suffix: "32",
74 },
75 lib64: {
76 suffix: "64",
77 },
78 },
79}