blob: b654f76b637000e8980f295352bf0b8bb469e025 [file] [log] [blame]
Bob Badour4114d1a2021-02-12 15:38:42 -08001package {
2 default_applicable_licenses: ["system_netd_license"],
3}
4
5// Added automatically by a large-scale-change
6// See: http://go/android-license-faq
7license {
8 name: "system_netd_license",
9 visibility: [":__subpackages__"],
10 license_kinds: [
11 "SPDX-license-identifier-Apache-2.0",
12 ],
13 license_text: [
14 "NOTICE",
15 ],
16}
17
Robin Lee4fd4d392017-03-14 14:03:05 +000018cc_library_headers {
19 name: "libnetd_client_headers",
20 export_include_dirs: ["include"],
Remi NGUYEN VAN4bcb81c2020-11-27 19:04:14 +090021 apex_available: [
22 "//apex_available:platform",
Remi NGUYEN VAN4bcb81c2020-11-27 19:04:14 +090023 ],
Luke Huang743e0312020-05-26 17:21:28 +080024}
25
26cc_library_headers {
27 name: "libnetdbinder_utils_headers",
28 export_include_dirs: ["include/binder_utils"],
Jiyong Park3144db92020-04-08 23:40:11 +090029 apex_available: [
30 "//apex_available:platform",
31 "com.android.resolv",
Maciej Żenczykowskie3ea09c2022-06-15 01:04:03 -070032 ],
33 min_sdk_version: "29",
34}
35
36cc_library_headers {
37 name: "netd_mainline_headers",
38 export_include_dirs: ["include/mainline"],
39 apex_available: [
40 "//apex_available:platform",
Maciej Żenczykowskicb455402022-06-13 22:53:58 -070041 "com.android.tethering",
Jiyong Park3144db92020-04-08 23:40:11 +090042 ],
Maciej Żenczykowskicb455402022-06-13 22:53:58 -070043 sdk_version: "29",
Jooyung Han3c222552020-04-16 18:48:35 +090044 min_sdk_version: "29",
Robin Lee4fd4d392017-03-14 14:03:05 +000045}
46
Bernie Innocenti0c532742018-06-11 14:12:08 +090047cc_defaults {
48 name: "netd_defaults",
Bernie Innocenti98951792018-06-26 17:13:44 +090049 cflags: [
50 "-Wall",
51 "-Werror",
Bernie Innocenti11cd0202018-10-12 21:27:45 +090052 // Override -Wno-error=implicit-fallthrough from soong
53 "-Werror=implicit-fallthrough",
Bernie Innocentie6305552019-10-30 17:26:00 +090054 "-Werror=sometimes-uninitialized",
55 "-Werror=conditional-uninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090056 "-Wnullable-to-nonnull-conversion",
Bernie Innocenti45238a12018-12-04 14:57:48 +090057 "-Wsign-compare",
Bernie Innocenti98951792018-06-26 17:13:44 +090058 "-Wthread-safety",
59 "-Wunused-parameter",
waynema71a0b592018-11-21 13:31:34 +080060 "-Wuninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090061 ],
Bernie Innocenti0c532742018-06-11 14:12:08 +090062 tidy: true,
Bernie Innocentidf2640a2019-11-07 16:42:58 +090063 cpp_std: "experimental",
Bernie Innocenti0c532742018-06-11 14:12:08 +090064 tidy_checks: [
65 "android-*",
Maciej Żenczykowski9ef19d42020-04-22 09:57:49 -070066 "bugprone-*",
Bernie Innocenti0c532742018-06-11 14:12:08 +090067 "cert-*",
Bernie Innocenti2a008c52018-10-12 22:30:22 +090068 "clang-analyzer-security*",
Bernie Innocentia5161a02019-01-30 22:40:53 +090069 "google-*",
70 "misc-*",
71 "performance-*",
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080072 "-bugprone-macro-parentheses",
Maciej Żenczykowski9ef19d42020-04-22 09:57:49 -070073 "-bugprone-narrowing-conversions", // lots of unsigned -> int conversions
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080074 "-bugprone-unhandled-self-assignment", // found in DnsResolver/stats.pb.h
75 "-cert-dcl50-cpp",
Bernie Innocentia5161a02019-01-30 22:40:53 +090076 "-cert-err34-c", // TODO: re-enable after removing atoi() and sscanf() calls
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080077 "-cert-oop54-cpp", // found in DnsResolver/stats.pb.h
78 "-google-default-arguments",
79 "-google-explicit-constructor",
80 "-google-global-names-in-headers",
Bernie Innocentia5161a02019-01-30 22:40:53 +090081 "-google-readability-*", // Too pedantic
82 "-google-runtime-int", // Too many unavoidable warnings due to strtol()
83 "-google-runtime-references", // Grandfathered usage of pass by non-const reference
84 "-misc-non-private-member-variables-in-classes", // Also complains about structs
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080085 "-performance-noexcept-move-constructor",
86 "-performance-unnecessary-value-param",
Bernie Innocenti2a008c52018-10-12 22:30:22 +090087 ],
88 tidy_flags: [
Maciej Żenczykowski30224292020-04-30 13:03:28 -070089 "-warnings-as-errors="
90 + "android-*,"
91 + "bugprone-*,"
92 + "cert-*,"
93 + "clang-analyzer-security*,"
94 + "google-*,"
95 + "misc-*,"
96 + "performance-*"
Bernie Innocenti0c532742018-06-11 14:12:08 +090097 ],
98}