blob: 08d5412158d689474ed6b4246a685ae01347bc07 [file] [log] [blame]
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_library {
name: "libnetdutils",
srcs: [
"DumpWriter.cpp",
"Fd.cpp",
"InternetAddresses.cpp",
"Log.cpp",
"Netfilter.cpp",
"Netlink.cpp",
"NetlinkListener.cpp",
"Slice.cpp",
"Socket.cpp",
"SocketOption.cpp",
"Status.cpp",
"Syscalls.cpp",
"UniqueFd.cpp",
"UniqueFile.cpp",
"Utils.cpp",
],
defaults: ["netd_defaults"],
cflags: ["-Wall", "-Werror"],
shared_libs: [
"libbase",
"liblog",
],
export_shared_lib_headers: [
"libbase",
],
export_include_dirs: ["include"],
sanitize: {
cfi: true,
},
apex_available: [
"//apex_available:platform",
"com.android.resolv",
"com.android.tethering",
],
min_sdk_version: "29",
}
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",
],
}