blob: 22cb5c1516f5a72fef24c6bd5ac2a895d7be5338 [file] [log] [blame]
Robin Lee4fd4d392017-03-14 14:03:05 +00001// 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
Bob Badour4114d1a2021-02-12 15:38:42 -080015package {
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
Robin Lee4fd4d392017-03-14 14:03:05 +000024cc_library {
25 name: "libnetd_client",
Robin Lee4fd4d392017-03-14 14:03:05 +000026 srcs: [
27 "FwmarkClient.cpp",
28 "NetdClient.cpp",
29 ],
Luke Huangc68f1b92018-11-21 20:13:38 +080030 header_libs: [
Luke Huang743e0312020-05-26 17:21:28 +080031 "dnsproxyd_protocol_headers", // NETID_USE_LOCAL_NAMESERVERS
Luke Huangc68f1b92018-11-21 20:13:38 +080032 "libnetd_client_headers",
Luke Huange48fbcb2018-12-17 16:37:33 +080033 "libbase_headers", // for unique_fd.h
Luke Huangc68f1b92018-11-21 20:13:38 +080034 ],
Robin Lee4fd4d392017-03-14 14:03:05 +000035 export_header_lib_headers: ["libnetd_client_headers"],
Robin Lee4fd4d392017-03-14 14:03:05 +000036 include_dirs: [
Ken Chen3a42e772021-10-21 23:11:53 +080037 "frameworks/libs/net/common/netd/libnetdutils/include",
Robin Lee4fd4d392017-03-14 14:03:05 +000038 ],
Erik Klineab999f12018-07-04 11:29:31 +090039 defaults: ["netd_defaults"],
Ken Chen2e413c32020-01-13 11:59:53 +080040 sanitize: {
41 cfi: true,
Ken Chen2e413c32020-01-13 11:59:53 +080042 },
Remi NGUYEN VAN4bcb81c2020-11-27 19:04:14 +090043 apex_available: [
44 "//apex_available:platform",
Remi NGUYEN VAN4bcb81c2020-11-27 19:04:14 +090045 ],
Robin Lee4fd4d392017-03-14 14:03:05 +000046}
Luke Huang63df9482019-05-25 18:24:03 +080047
48cc_test {
49 name: "netdclient_test",
50 srcs: [
51 "NetdClientTest.cpp",
52 ],
53 defaults: ["netd_defaults"],
54 test_suites: ["device-tests"],
55 include_dirs: [
Luke Huang63df9482019-05-25 18:24:03 +080056 "system/netd/include",
chenbrucea7d6b812019-06-28 16:37:36 +080057 ],
Luke Huang63df9482019-05-25 18:24:03 +080058 static_libs: [
59 "libgmock",
60 "libbase",
61 "libnetd_client",
62 ],
63 sanitize: {
Maciej Żenczykowski85a0e3e2021-01-15 23:00:47 -080064 address: false,
Luke Huang63df9482019-05-25 18:24:03 +080065 recover: [ "all" ],
66 },
67}