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 16package { 17 default_team: "trendy_team_fwk_core_networking", 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_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 ], 39 static_libs: [ 40 "libmodules-utils-build", 41 ], 42 shared_libs: [ 43 "libbase", 44 "liblog", 45 "libnetdutils", 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 59cc_test { 60 name: "netd_updatable_unit_test", 61 defaults: ["netd_defaults"], 62 test_suites: [ 63 "general-tests", 64 "mts-tethering", 65 ], 66 test_config_template: ":net_native_test_config_template", 67 require_root: true, // required by setrlimitForTest() 68 header_libs: [ 69 "bpf_connectivity_headers", 70 ], 71 srcs: [ 72 "BpfHandlerTest.cpp", 73 "BpfBaseTest.cpp", 74 ], 75 version_script: ":connectivity_mainline_test_map", 76 stl: "libc++_static", 77 static_libs: [ 78 "libbase", 79 "libnetd_updatable", 80 ], 81 shared_libs: [ 82 "libcutils", 83 "liblog", 84 "libnetdutils", 85 "libprocessgroup", 86 ], 87 compile_multilib: "both", 88 multilib: { 89 lib32: { 90 suffix: "32", 91 }, 92 lib64: { 93 suffix: "64", 94 }, 95 }, 96} 97