blob: 2ae5911ecfe0b2c13f42042a0466978c42b54922 [file] [log] [blame]
Ken Chen38cf6982021-10-21 22:18:59 +08001package {
Aditya Choudhary71086be2024-01-31 11:08:57 +00002 default_team: "trendy_team_fwk_core_networking",
Ken Chen38cf6982021-10-21 22:18:59 +08003 default_applicable_licenses: ["Android-Apache-2.0"],
4}
5
6cc_library {
7 name: "libnetdutils",
8 srcs: [
9 "DumpWriter.cpp",
10 "Fd.cpp",
11 "InternetAddresses.cpp",
12 "Log.cpp",
13 "Netfilter.cpp",
14 "Netlink.cpp",
Wayne Mab48a1202022-01-18 18:20:24 +080015 "NetlinkListener.cpp",
Ken Chen38cf6982021-10-21 22:18:59 +080016 "Slice.cpp",
17 "Socket.cpp",
18 "SocketOption.cpp",
19 "Status.cpp",
20 "Syscalls.cpp",
21 "UniqueFd.cpp",
22 "UniqueFile.cpp",
waynema51800da2021-12-08 11:36:02 +080023 "Utils.cpp",
Ken Chen38cf6982021-10-21 22:18:59 +080024 ],
25 defaults: ["netd_defaults"],
Aditya Choudhary71086be2024-01-31 11:08:57 +000026 cflags: [
27 "-Wall",
28 "-Werror",
29 ],
Ken Chen38cf6982021-10-21 22:18:59 +080030 shared_libs: [
31 "libbase",
32 "liblog",
33 ],
34 export_shared_lib_headers: [
35 "libbase",
36 ],
37 export_include_dirs: ["include"],
38 sanitize: {
39 cfi: true,
40 },
41
42 apex_available: [
43 "//apex_available:platform",
44 "com.android.resolv",
Ken Chen3250a842021-10-29 06:20:20 +080045 "com.android.tethering",
Ken Chen38cf6982021-10-21 22:18:59 +080046 ],
Maciej Żenczykowski127a1442023-09-19 23:17:10 +000047 min_sdk_version: "30",
Ken Chen38cf6982021-10-21 22:18:59 +080048}
49
50cc_test {
51 name: "netdutils_test",
52 srcs: [
53 "BackoffSequenceTest.cpp",
54 "FdTest.cpp",
55 "InternetAddressesTest.cpp",
56 "LogTest.cpp",
57 "MemBlockTest.cpp",
58 "SliceTest.cpp",
59 "StatusTest.cpp",
60 "SyscallsTest.cpp",
61 "ThreadUtilTest.cpp",
62 ],
63 defaults: ["netd_defaults"],
64 test_suites: ["device-tests"],
65 static_libs: [
66 "libgmock",
67 "libnetdutils",
68 ],
69 shared_libs: [
70 "libbase",
71 ],
72}
Motomu Utsumi68cd7312023-08-22 12:50:20 +090073
74cc_library_headers {
75 name: "libnetd_utils_headers",
76 export_include_dirs: ["include"],
77}