2021-10-21 22:18:59 +08:00
|
|
|
package {
|
2024-01-31 11:08:57 +00:00
|
|
|
default_team: "trendy_team_fwk_core_networking",
|
2021-10-21 22:18:59 +08:00
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cc_library {
|
|
|
|
|
name: "libnetdutils",
|
|
|
|
|
srcs: [
|
|
|
|
|
"DumpWriter.cpp",
|
|
|
|
|
"Fd.cpp",
|
|
|
|
|
"InternetAddresses.cpp",
|
|
|
|
|
"Log.cpp",
|
|
|
|
|
"Netfilter.cpp",
|
|
|
|
|
"Netlink.cpp",
|
2022-01-18 18:20:24 +08:00
|
|
|
"NetlinkListener.cpp",
|
2021-10-21 22:18:59 +08:00
|
|
|
"Slice.cpp",
|
|
|
|
|
"Socket.cpp",
|
|
|
|
|
"SocketOption.cpp",
|
|
|
|
|
"Status.cpp",
|
|
|
|
|
"Syscalls.cpp",
|
|
|
|
|
"UniqueFd.cpp",
|
|
|
|
|
"UniqueFile.cpp",
|
2021-12-08 11:36:02 +08:00
|
|
|
"Utils.cpp",
|
2021-10-21 22:18:59 +08:00
|
|
|
],
|
|
|
|
|
defaults: ["netd_defaults"],
|
2024-01-31 11:08:57 +00:00
|
|
|
cflags: [
|
|
|
|
|
"-Wall",
|
|
|
|
|
"-Werror",
|
|
|
|
|
],
|
2021-10-21 22:18:59 +08:00
|
|
|
shared_libs: [
|
|
|
|
|
"libbase",
|
|
|
|
|
"liblog",
|
|
|
|
|
],
|
|
|
|
|
export_shared_lib_headers: [
|
|
|
|
|
"libbase",
|
|
|
|
|
],
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
|
sanitize: {
|
|
|
|
|
cfi: true,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
apex_available: [
|
|
|
|
|
"//apex_available:platform",
|
|
|
|
|
"com.android.resolv",
|
2021-10-29 06:20:20 +08:00
|
|
|
"com.android.tethering",
|
2021-10-21 22:18:59 +08:00
|
|
|
],
|
2023-09-19 23:17:10 +00:00
|
|
|
min_sdk_version: "30",
|
2021-10-21 22:18:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cc_test {
|
|
|
|
|
name: "netdutils_test",
|
|
|
|
|
srcs: [
|
|
|
|
|
"BackoffSequenceTest.cpp",
|
|
|
|
|
"FdTest.cpp",
|
|
|
|
|
"InternetAddressesTest.cpp",
|
|
|
|
|
"LogTest.cpp",
|
|
|
|
|
"MemBlockTest.cpp",
|
|
|
|
|
"SliceTest.cpp",
|
|
|
|
|
"StatusTest.cpp",
|
|
|
|
|
"SyscallsTest.cpp",
|
|
|
|
|
"ThreadUtilTest.cpp",
|
|
|
|
|
],
|
|
|
|
|
defaults: ["netd_defaults"],
|
|
|
|
|
test_suites: ["device-tests"],
|
|
|
|
|
static_libs: [
|
|
|
|
|
"libgmock",
|
|
|
|
|
"libnetdutils",
|
|
|
|
|
],
|
|
|
|
|
shared_libs: [
|
|
|
|
|
"libbase",
|
|
|
|
|
],
|
|
|
|
|
}
|
2023-08-22 12:50:20 +09:00
|
|
|
|
|
|
|
|
cc_library_headers {
|
|
|
|
|
name: "libnetd_utils_headers",
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
|
}
|