Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 1 | // |
| 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 | |
Bob Badour | 4ef4a44 | 2022-02-10 10:57:23 -0800 | [diff] [blame] | 16 | package { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 17 | default_team: "trendy_team_fwk_core_networking", |
Bob Badour | 4ef4a44 | 2022-02-10 10:57:23 -0800 | [diff] [blame] | 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 21 | cc_library { |
| 22 | name: "libnetd_updatable", |
| 23 | version_script: "libnetd_updatable.map.txt", |
| 24 | stubs: { |
| 25 | versions: [ |
| 26 | "1", |
| 27 | ], |
| 28 | symbol_file: "libnetd_updatable.map.txt", |
| 29 | }, |
| 30 | defaults: ["netd_defaults"], |
| 31 | header_libs: [ |
| 32 | "bpf_connectivity_headers", |
| 33 | "libcutils_headers", |
| 34 | ], |
| 35 | srcs: [ |
| 36 | "BpfHandler.cpp", |
| 37 | "NetdUpdatable.cpp", |
| 38 | ], |
Maciej Żenczykowski | 65075bb | 2023-06-01 23:09:14 +0000 | [diff] [blame] | 39 | static_libs: [ |
| 40 | "libmodules-utils-build", |
| 41 | ], |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 42 | shared_libs: [ |
Maciej Żenczykowski | dcae351 | 2022-01-31 19:59:32 -0800 | [diff] [blame] | 43 | "libbase", |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 44 | "liblog", |
Maciej Żenczykowski | dcae351 | 2022-01-31 19:59:32 -0800 | [diff] [blame] | 45 | "libnetdutils", |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 46 | ], |
| 47 | export_include_dirs: ["include"], |
| 48 | header_abi_checker: { |
| 49 | enabled: true, |
| 50 | symbol_file: "libnetd_updatable.map.txt", |
| 51 | }, |
| 52 | sanitize: { |
| 53 | cfi: true, |
| 54 | }, |
| 55 | apex_available: ["com.android.tethering"], |
| 56 | min_sdk_version: "30", |
| 57 | } |
| 58 | |
| 59 | cc_test { |
| 60 | name: "netd_updatable_unit_test", |
| 61 | defaults: ["netd_defaults"], |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 62 | test_suites: [ |
| 63 | "general-tests", |
| 64 | "mts-tethering", |
| 65 | ], |
Ken Chen | b9266bf | 2022-05-25 15:34:17 +0800 | [diff] [blame] | 66 | test_config_template: ":net_native_test_config_template", |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 67 | require_root: true, // required by setrlimitForTest() |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 68 | header_libs: [ |
| 69 | "bpf_connectivity_headers", |
| 70 | ], |
| 71 | srcs: [ |
| 72 | "BpfHandlerTest.cpp", |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 73 | "BpfBaseTest.cpp", |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 74 | ], |
Ryan Prichard | 7b60593 | 2024-05-23 01:33:48 -0700 | [diff] [blame] | 75 | version_script: ":connectivity_mainline_test_map", |
| 76 | stl: "libc++_static", |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 77 | static_libs: [ |
Henri Chataing | 6a7d8f9 | 2023-12-19 22:21:15 +0000 | [diff] [blame] | 78 | "libbase", |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 79 | "libnetd_updatable", |
| 80 | ], |
| 81 | shared_libs: [ |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 82 | "libcutils", |
| 83 | "liblog", |
| 84 | "libnetdutils", |
Maciej Żenczykowski | 70d30ec | 2022-12-19 14:50:18 -0800 | [diff] [blame] | 85 | "libprocessgroup", |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 86 | ], |
Ken Chen | b9266bf | 2022-05-25 15:34:17 +0800 | [diff] [blame] | 87 | compile_multilib: "both", |
Ken Chen | 1647f60 | 2021-10-05 21:55:22 +0800 | [diff] [blame] | 88 | multilib: { |
| 89 | lib32: { |
| 90 | suffix: "32", |
| 91 | }, |
| 92 | lib64: { |
| 93 | suffix: "64", |
| 94 | }, |
| 95 | }, |
| 96 | } |