blob: 53c1bd4cfa4e2ebf1de92438900c717ed88239e1 [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 ],
34 static_libs: [
35 "libnetdutils",
36 ],
37 shared_libs: [
38 "libbase",
39 "liblog",
40 ],
41 export_include_dirs: ["include"],
42 header_abi_checker: {
43 enabled: true,
44 symbol_file: "libnetd_updatable.map.txt",
45 },
46 sanitize: {
47 cfi: true,
48 },
49 apex_available: ["com.android.tethering"],
50 min_sdk_version: "30",
51}
52
53cc_test {
54 name: "netd_updatable_unit_test",
55 defaults: ["netd_defaults"],
56 test_suites: ["general-tests"],
57 require_root: true, // required by setrlimitForTest()
58 header_libs: [
59 "bpf_connectivity_headers",
60 ],
61 srcs: [
62 "BpfHandlerTest.cpp",
63 ],
64 static_libs: [
65 "libnetd_updatable",
66 ],
67 shared_libs: [
68 "libbase",
69 "libcutils",
70 "liblog",
71 "libnetdutils",
72 ],
73 multilib: {
74 lib32: {
75 suffix: "32",
76 },
77 lib64: {
78 suffix: "64",
79 },
80 },
81}