| Ken Chen | ec0f7ac | 2023-09-08 14:14:55 +0800 | [diff] [blame] | 1 | // | 
|  | 2 | // Copyright (C) 2023 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 |  | 
|  | 16 | package { | 
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 17 | default_team: "trendy_team_fwk_core_networking", | 
| Ken Chen | ec0f7ac | 2023-09-08 14:14:55 +0800 | [diff] [blame] | 18 | default_applicable_licenses: ["Android-Apache-2.0"], | 
|  | 19 | } | 
|  | 20 |  | 
|  | 21 | cc_library { | 
|  | 22 | name: "libcom.android.tethering.dns_helper", | 
|  | 23 | version_script: "libcom.android.tethering.dns_helper.map.txt", | 
|  | 24 | stubs: { | 
|  | 25 | versions: [ | 
|  | 26 | "1", | 
|  | 27 | ], | 
|  | 28 | symbol_file: "libcom.android.tethering.dns_helper.map.txt", | 
|  | 29 | }, | 
|  | 30 | defaults: ["netd_defaults"], | 
|  | 31 | header_libs: [ | 
|  | 32 | "bpf_connectivity_headers", | 
|  | 33 | "libcutils_headers", | 
|  | 34 | ], | 
|  | 35 | srcs: [ | 
|  | 36 | "DnsBpfHelper.cpp", | 
|  | 37 | "DnsHelper.cpp", | 
|  | 38 | ], | 
|  | 39 | static_libs: [ | 
|  | 40 | "libmodules-utils-build", | 
|  | 41 | ], | 
|  | 42 | shared_libs: [ | 
|  | 43 | "libbase", | 
|  | 44 | ], | 
|  | 45 | export_include_dirs: ["include"], | 
|  | 46 | header_abi_checker: { | 
|  | 47 | enabled: true, | 
|  | 48 | symbol_file: "libcom.android.tethering.dns_helper.map.txt", | 
|  | 49 | }, | 
|  | 50 | sanitize: { | 
|  | 51 | cfi: true, | 
|  | 52 | }, | 
|  | 53 | apex_available: ["com.android.tethering"], | 
|  | 54 | min_sdk_version: "30", | 
|  | 55 | } | 
| Ken Chen | d4876de | 2023-09-13 00:53:52 +0800 | [diff] [blame] | 56 |  | 
|  | 57 | cc_test { | 
|  | 58 | name: "dns_helper_unit_test", | 
|  | 59 | defaults: ["netd_defaults"], | 
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 60 | test_suites: [ | 
|  | 61 | "general-tests", | 
|  | 62 | "mts-tethering", | 
|  | 63 | ], | 
| Ken Chen | d4876de | 2023-09-13 00:53:52 +0800 | [diff] [blame] | 64 | test_config_template: ":net_native_test_config_template", | 
|  | 65 | header_libs: [ | 
|  | 66 | "bpf_connectivity_headers", | 
|  | 67 | ], | 
|  | 68 | srcs: [ | 
|  | 69 | "DnsBpfHelperTest.cpp", | 
|  | 70 | ], | 
|  | 71 | static_libs: [ | 
|  | 72 | "libcom.android.tethering.dns_helper", | 
|  | 73 | ], | 
|  | 74 | shared_libs: [ | 
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 75 | "libbase", | 
|  | 76 | "libcutils", | 
| Ken Chen | d4876de | 2023-09-13 00:53:52 +0800 | [diff] [blame] | 77 | ], | 
|  | 78 | compile_multilib: "both", | 
|  | 79 | multilib: { | 
|  | 80 | lib32: { | 
|  | 81 | suffix: "32", | 
|  | 82 | }, | 
|  | 83 | lib64: { | 
|  | 84 | suffix: "64", | 
|  | 85 | }, | 
|  | 86 | }, | 
|  | 87 | } |