Ken Chen | 38cf698 | 2021-10-21 22:18:59 +0800 | [diff] [blame] | 1 | package { |
Aditya Choudhary | 71086be | 2024-01-31 11:08:57 +0000 | [diff] [blame^] | 2 | default_team: "trendy_team_fwk_core_networking", |
Ken Chen | 38cf698 | 2021-10-21 22:18:59 +0800 | [diff] [blame] | 3 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 4 | } |
| 5 | |
| 6 | cc_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 Ma | b48a120 | 2022-01-18 18:20:24 +0800 | [diff] [blame] | 15 | "NetlinkListener.cpp", |
Ken Chen | 38cf698 | 2021-10-21 22:18:59 +0800 | [diff] [blame] | 16 | "Slice.cpp", |
| 17 | "Socket.cpp", |
| 18 | "SocketOption.cpp", |
| 19 | "Status.cpp", |
| 20 | "Syscalls.cpp", |
| 21 | "UniqueFd.cpp", |
| 22 | "UniqueFile.cpp", |
waynema | 51800da | 2021-12-08 11:36:02 +0800 | [diff] [blame] | 23 | "Utils.cpp", |
Ken Chen | 38cf698 | 2021-10-21 22:18:59 +0800 | [diff] [blame] | 24 | ], |
| 25 | defaults: ["netd_defaults"], |
Aditya Choudhary | 71086be | 2024-01-31 11:08:57 +0000 | [diff] [blame^] | 26 | cflags: [ |
| 27 | "-Wall", |
| 28 | "-Werror", |
| 29 | ], |
Ken Chen | 38cf698 | 2021-10-21 22:18:59 +0800 | [diff] [blame] | 30 | 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 Chen | 3250a84 | 2021-10-29 06:20:20 +0800 | [diff] [blame] | 45 | "com.android.tethering", |
Ken Chen | 38cf698 | 2021-10-21 22:18:59 +0800 | [diff] [blame] | 46 | ], |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 47 | min_sdk_version: "30", |
Ken Chen | 38cf698 | 2021-10-21 22:18:59 +0800 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | cc_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 Utsumi | 68cd731 | 2023-08-22 12:50:20 +0900 | [diff] [blame] | 73 | |
| 74 | cc_library_headers { |
| 75 | name: "libnetd_utils_headers", |
| 76 | export_include_dirs: ["include"], |
| 77 | } |