1// Copyright (C) 2017 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "system_netd_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["system_netd_license"], 22} 23 24cc_library { 25 name: "libnetd_client", 26 srcs: [ 27 "FwmarkClient.cpp", 28 "NetdClient.cpp", 29 ], 30 header_libs: [ 31 "dnsproxyd_protocol_headers", // NETID_USE_LOCAL_NAMESERVERS 32 "libnetd_client_headers", 33 "libbase_headers", // for unique_fd.h 34 ], 35 export_header_lib_headers: ["libnetd_client_headers"], 36 include_dirs: [ 37 "frameworks/libs/net/common/netd/libnetdutils/include", 38 ], 39 defaults: ["netd_defaults"], 40 sanitize: { 41 cfi: true, 42 }, 43 apex_available: [ 44 "//apex_available:platform", 45 ], 46} 47 48cc_test { 49 name: "netdclient_test", 50 srcs: [ 51 "NetdClientTest.cpp", 52 ], 53 defaults: ["netd_defaults"], 54 test_suites: ["device-tests"], 55 include_dirs: [ 56 "system/netd/include", 57 ], 58 static_libs: [ 59 "libgmock", 60 "libbase", 61 "libnetd_client", 62 ], 63 sanitize: { 64 address: false, 65 recover: [ "all" ], 66 }, 67} 68 69cc_test { 70 name: "netdclient_root_test", 71 require_root: true, // for ScopedUidChange 72 srcs: [ 73 "NetdClientRootTest.cpp", 74 ], 75 defaults: [ 76 "netd_aidl_interface_lateststable_cpp_static", 77 "netd_defaults", 78 ], 79 test_suites: ["device-tests"], 80 include_dirs: [ 81 "system/netd/include", 82 ], 83 static_libs: [ 84 "libbase", 85 "libnetd_client", 86 "libnetd_test_utils", 87 ], 88 sanitize: { 89 address: false, 90 recover: [ "all" ], 91 }, 92} 93